Unindent Text Online

Leading spaces and tabs can make pasted text look uneven or hard to reuse. This tool removes indentation so every line starts at the same left edge.

Paste your text, unindent it, and copy the cleaned output in seconds.

Input Text

Cleaning Options

Cleaned Text

Privacy & usage: your text stays in your browser. See Privacy, Terms.

Try It in 30 Seconds

  1. Paste text that has extra indentation on each line.

  2. Keep "Remove Indentation" enabled.

  3. Click Clean Text and copy the left-aligned result.

Examples

Example 1

Input

    line one
		line two
  line three

Output

line one
line two
line three

Visible markers: [space]=space, [tab]=tab, [lb]=line break

Input (with markers)

[space][space][space][space]line[space]one[lb]
[tab][tab]line[space]two[lb]
[space][space]line[space]three

Output (with markers)

line[space]one[lb]
line[space]two[lb]
line[space]three

Result: leading indentation is removed while the text stays the same.

Example 2

Input

    - Item one
    - Item two
    - Item three

Output

- Item one
- Item two
- Item three

Example 3

Input

		> Quoted line
		> Another quote

Output

> Quoted line
> Another quote

How It Works

  1. Paste text copied from code blocks, emails, or documents.

  2. Remove leading indentation from each line.

  3. Copy the cleaned text into your editor or form.

Common Sources

Code blocks
Email threads
Markdown notes
Docs exports
Chat logs

Frequently Asked Questions

Does this remove email quote markers (>)?

No. Use the Remove Email Indents option to strip leading > characters from quoted emails.

Will it remove tabs as well as spaces?

Yes. Any leading indentation is removed, whether it is tabs or spaces.

Will it remove all spaces?

No. It only removes indentation at the start of each line and keeps normal spacing inside lines.

Is this safe for code?

Only if you want to remove indentation. If you need code indentation preserved, leave it off.

Will line breaks stay intact?

Yes. Line breaks stay unless you enable "Remove All Line Breaks."