Indent text
Add or remove indentation at the start of every line, with spaces or tabs.
Related tools
Indent text
Indent text adds or removes leading whitespace on every line at once. Paste a block of code, a list or a quote, choose spaces or tabs and how many per line, and the tool re-indents the whole thing instantly. It is the quick way to shift a snippet into place inside a larger file, indent a blockquote, or line up a plain-text outline without touching each row by hand.
Three actions cover the usual needs. "Add indentation" prefixes each line with the chosen number of spaces or tabs. "Remove indentation" strips up to that many units from the start of each line, and it is forgiving: a line with fewer leading spaces than the count simply loses what it has, so nothing shifts out of alignment. In spaces mode a leading tab is left alone, and in tabs mode leading spaces are left alone, so you never mix the two by accident.
"Remove common indentation" works like a code dedent: it finds the whitespace that every non-empty line shares and removes exactly that much from all of them, so a snippet copied out of a deeply nested function drops back to the left margin while its internal structure stays intact. This one ignores the amount and unit settings, because the shared margin defines how much to cut.
The "Leave empty lines untouched" option keeps blank and whitespace-only lines as they are, so adding indentation never sprinkles trailing spaces onto empty lines. Line endings are normalised, so mixed CRLF and LF input comes out consistent. Everything runs locally in your browser and nothing is uploaded.