Remove Extra Spaces

Removes double and non-breaking spaces, tabs, spaces at line edges, extra blank lines, and invisible characters in one pass.

Paste your text or upload a file and extra spaces disappear in a single pass. You can copy the result or download it as a file.

What gets removed

Double and triple spaces become one, tab characters inside a line are replaced with a space, and spaces at the start and end of a line are trimmed. A series of regular and non-breaking spaces also collapses into one, otherwise a wide gap stays on the screen even after the double spaces are gone. Consecutive empty lines shrink to a single line, and empty lines at the very start and end of the text are removed completely.

Thousands separators stay in place

A single non-breaking or thin space between characters is usually intentional: in "1 000 000", in "No. 5", or between initials. The tool leaves these spaces alone and does not replace them with regular ones. A number will only stay on one line if the separator between digits is a non-breaking space, since browsers treat a thin space the same as a regular one and may break the line there.

Rate this tool

Help us get better

Other tools