Clean whitespace

All tools

How to use this tool: Clean whitespace

Clean up a pasted list by trimming lines, removing blanks or collapsing runs of spaces. This is not a programming-language formatter.

Steps

Paste the input into the form and choose a mode if one is offered. Check the result before copying or saving it.

Use this tool: Clean whitespace

Example

" A B " → "A B"
" A B " → "A B"

What to check

Do not remove indentation blindly: some formats use spaces and line breaks to show structure. Test a small sample first.

Common tasks and examples

Start with a small sample. Compare the structure before and after a format conversion, or check that only the intended characters changed in a text operation.

  • " A " → "A"
  • "A B" → "A B"
  • A\n\nB → A\nB

Task reference

Trim each line
Settings: Input: " A " · What to expect: "A"
Also collapse repeated spaces
Settings: Input: "A B" · What to expect: "A B"
Also remove blank lines
Settings: Input: A\n\nB · What to expect: A\nB
Also collapse repeated spaces
Settings: Input: A\t\tB · What to expect: A B

More tools