go-supertools
Text Tools

Whitespace Normalizer

Clean up messy text by removing extra spaces, tabs, and empty lines while normalizing whitespace for better formatting.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

About this tool

This tool cleans messy spacing in your text. Choose one of six modes. Normalize collapses runs of spaces and tabs into one space and trims spaces from the start and end of each line. Collapse multiple spaces does the same collapsing only. Trim each line removes spaces at both ends of every line. Remove empty lines deletes blank lines. Tabs to spaces swaps each tab for four spaces. Remove all whitespace deletes every space, tab and line break. Only one mode is applied at a time. The text is processed in your browser as you type.

How to use it

  1. Paste your text into the input box.
  2. Pick a mode in the Mode selector.
  3. Check the output and press Copy.
  4. Run the tool again on the result with another mode if you need two steps.

Example

Normalize mode. Runs of spaces and tabs collapse to one space and trailing spaces are removed. The leading space stays.

Input
  a   b 	 c  

 d 
Result
 a b c

 d

Common problems

Leading spaces are still there after Normalize
Normalize collapses runs of spaces to one, but it does not remove spaces at the start of a line. Run Trim each line afterward.
Blank lines are not removed
Only the Remove empty lines mode removes them. Normalize keeps your line breaks.
Remove all whitespace also removes line breaks
The whole text becomes one unbroken string with no spaces.