Home / Text and List Tools / Remove Extra Spaces
Free online tool

Remove Extra Spaces

Clean repeated spaces, trim line edges and reduce extra blank lines. Three independent options; up to 500000 UTF-16 units, processed locally.

Start using

Remove Extra Spaces

Trimming removes JavaScript whitespace from each line edge, including nonbreaking space U+00A0 and ideographic space U+3000, but not zero-width space U+200B. Collapsing replaces runs of at least two ASCII spaces or tabs with one ASCII space; a lone tab remains. Other Unicode spaces inside a line are not collapsed. The blank-line option replaces three or more consecutive LF characters with two, leaving at most one empty separator line. A line containing spaces is only made empty if trimming is enabled. CRLF input is joined with LF in the output even with every checkbox off. The tool does not interpret HTML or protect significant indentation in code and tables; keep the original.

Input

  A	B  


  C  

Result

A	B

C

Processing takes place locally in your browser.