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.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use Text Indent and Unindent
Step by step, start to finish.
Code, a quote, a list, anything where every line needs to move together. Files can be dropped on the box.
Indent adds the same amount to every line. Unindent removes the indentation the whole block shares, which keeps the nesting inside it.
Four spaces is the common default. If the file you are pasting into uses tabs, pick tabs here so the result matches it.
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.
Indent deeper, unindent by the shared amount, or strip the indentation off completely.
Unindent measures the block before it cuts, so inner levels keep their relative depth.
Choose the unit and the count, so the result matches the file you are pasting into.
Indent only the lines that contain a given word, leaving everything else where it is.
The smallest and largest indentation in the block are shown, so you know what you are about to change.
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.