Remove Indentation From Text
Strip leading spaces and tabs from the start of every line.
Text Tools Runs in your browser
How do you remove indentation from text?
Every line snaps to the left margin: leading spaces and tabs are cut from the front while the words and any spacing between them are preserved. A nested code block that starts eight spaces deep ends up flush left, and lines holding nothing but whitespace come out empty. Nothing after the first visible character is touched, so inline alignment inside a line survives.
How to use the Remove Indentation
- 1 Paste indented code or text.
- 2 Leading tabs and spaces vanish from the front of each line.
- 3 Verify inner alignment is intact, then copy the flush-left result.
What you can use it for
- Flattening copied code to the left margin.
- Fixing accidental indentation in notes.
- Squaring up pasted text that arrived indented.
- Normalising lists before re-formatting.
Frequently asked questions
Does inner spacing survive?
Yes. Removal stops at the first non-whitespace character, so column alignment or extra spaces inside the line are preserved.
Are tabs handled the same as spaces?
Both, in any mix. A line starting with two tabs and three spaces loses all five characters.
What becomes of whitespace-only lines?
They end up empty. Visually nothing changes; the invisible characters are gone.
Related tools
More Text Tools
More tools like this:
All Text Tools