Line Formatting Tools

Dedent Text Online

Strip the shared indentation from every line at once.

PrivateYour text is processed on your device and never uploaded.
Input
Result
0 chars · 0 lines

Code and quotes pasted from elsewhere often arrive with a shared block of leading indentation you do not want.

Dedent Text finds the smallest common indent across the lines and removes exactly that much from each.

How to use Dedent Text Online

  1. Paste the indented block you want to clean into the input box.
  2. Dedent Text measures the common leading whitespace and strips it from every line.
  3. Copy the dedented text, or download it as a text file.

Use cases

Good to know

Dedent Text looks at the non-empty lines, finds the smallest amount of leading whitespace they share, and removes that amount from every line. Relative indentation between lines is preserved, and blank lines are ignored when measuring.

Frequently asked questions

Does Dedent Text remove all indentation?

No. It removes only the indent shared by every line, so deeper nested lines keep their extra spacing.

Do tabs and spaces count the same?

Each leading character is counted by position, so mixing tabs and spaces can affect how much is removed.

Are blank lines considered when measuring?

No. Empty lines are skipped while finding the common indent, so they do not force the removal to zero.

Related Line Formatting Tools