Free online tools

Text Dedent and Indent Converter

Clean up a code example or a nested quotation while retaining relative indentation.

Enter your values

This tool processes your input in your browser.

Result

Remove only the shared left margin

Dedent finds the minimum visible indentation on nonblank lines. Removing that amount preserves the spacing that distinguishes an inner line from its parent.

Treat leading tabs using a tab stop

When dedenting, a leading tab advances to the next stop at the chosen width. The result uses spaces for the remaining left indentation. Characters after indentation remain in place.

Frequently asked questions

Do blank lines affect the minimum indent?

Only lines with content contribute to the minimum. Blank lines stay blank when the text is transformed.