How to use the indentation adjuster
Moving a code block into a document, or pasting code back out of one, usually means fixing only the whitespace at the start of every line. This tool walks the pasted text line by line, changes just the leading spaces and tabs, and leaves the line contents and the line breaks exactly as they were.
There are two actions. Add prepends the chosen number of spaces or tabs to every line. Remove offers two scopes: strip all leading whitespace, or strip only the number of columns you set so the relative nesting between lines survives. In both cases the number you type is the amount removed, never the amount kept.
Text that mixes tabs and spaces needs a counting rule. When removing, the tool expands each leading tab to the tab width you set, counts columns on that basis, and writes the remaining indentation back as spaces. If any expansion actually happened, the processing note above the output says how many tabs were converted, so you can confirm the result is what you expected. Adding does no expansion at all: the character you pick is inserted literally.
Blank lines are left alone by default, and whitespace-only lines count as blank, so paragraph gaps do not pick up stray indentation. Clear the checkbox to indent them too. Everything runs in your browser and nothing is uploaded to a server.
Frequently asked questions
When removing, each leading tab is expanded to the tab width you set, columns are counted on that basis, and the output indentation is written back as spaces. The processing note reports how many tabs were expanded.
No. It is the number of columns stripped from the front of each line. Entering 4 deletes four columns and leaves any deeper indentation in place.