Skip to main content
WizTools123
Free Online Tools

Tool Categories


Text Tools New Tool

Free Online Text Indenter, Indent or Unindent Every Line

Indent a whole block of text or take the indentation off again. Pick spaces or tabs and how many, indent only some lines, or remove the smallest indentation the block shares so that nested lines keep their relative shape instead of being flattened.

Free Forever Nothing Uploaded Indent or unindent Keeps nesting
Free Online Text Indenter, Indent or Unindent Every Line
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
Text Indenter Everything happens in this tab. Nothing you paste is sent anywhere.
Your text
0 characters 0 words 0 lines
Result
0 characters 0 lines
What to do
By how much
Lines

0 lines 0 changed 0 smallest indent 0 largest indent

Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Use Text Indent and Unindent

Step by step, start to finish.

1
Paste the block

Code, a quote, a list, anything where every line needs to move together. Files can be dropped on the box.

2
Pick indent or unindent

Indent adds the same amount to every line. Unindent removes the indentation the whole block shares, which keeps the nesting inside it.

3
Choose spaces or tabs

Four spaces is the common default. If the file you are pasting into uses tabs, pick tabs here so the result matches it.

4
Copy the result

The output box has the block at its new depth, ready to paste. The original is untouched in the left box.

Key Features

What this tool does, and what it does not do.

Both directions

Indent deeper, unindent by the shared amount, or strip the indentation off completely.

Nesting survives

Unindent measures the block before it cuts, so inner levels keep their relative depth.

Spaces or tabs

Choose the unit and the count, so the result matches the file you are pasting into.

Only some lines

Indent only the lines that contain a given word, leaving everything else where it is.

Measured first

The smallest and largest indentation in the block are shown, so you know what you are about to change.

Nothing uploaded

Source code and internal documents stay in the tab. There is no server in the middle.

About Text Indent and Unindent

Moving a block of text one level in or out is a two second job in an editor and a nuisance everywhere else: in a comment box, in an email, in a chat message, in a content management system that eats tabs. This page does the same thing as the editor command, without needing the editor.

The part that is easy to get wrong is unindenting. The naive version removes a fixed number of characters from the start of every line, which works until one line is already at the margin, and then everything after it is pulled left by a different amount and the structure collapses. Measuring the shared indentation first and removing exactly that keeps the inner shape intact, which is the behaviour people expect without being able to name it.

The counters are there for the same reason as elsewhere on this site: so that you can see what the text is before you change it. A block whose smallest indent is three and largest is eleven is telling you something about how it was written, usually that two people used different settings.

Frequently Asked Questions

Common questions about this tool.

Unindent removes the amount every line shares, so a nested block keeps its nesting. Remove all indentation pushes every line hard against the left margin, which flattens the structure. The first is what you usually want; the second is for turning a quoted block back into plain text.

Because indenting them would leave invisible trailing whitespace, which shows up in diffs and is flagged by linters. If you need it, switch on "Indent blank lines too".

Yes. Four spaces is the classic markdown code block indentation, which is the default here. Fenced code blocks with backticks need no indentation at all, so in that case you want the unindent mode instead.

It will indent it, but the measurement for unindenting counts a tab as one character, so a mixed block gives a result that depends on which came first. Convert the block to one or the other first with the tabs and spaces converter.

Forty units per step, which is deeper than any sensible document needs. Run it twice if you really want more.
Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner