Skip to content
CornerTools

Remove Extra Spaces

Remove extra spaces, tabs, and blank lines from text

Empty lines
Characters: 0Spaces removed: 0Lines removed: 0

Cleans up spacing in text pasted from PDFs, emails, spreadsheets or web pages: double spaces, tabs, spaces at the start and end of lines, and empty lines. The cleaned text updates as you type or change an option.

Cleanup options

  • Replace tabs with a space — each run of tabs becomes a single space.
  • Convert special spaces — non-breaking, thin and other special spaces, common in text from Word and web pages, become ordinary spaces, and zero width spaces, word joiners and byte order marks are removed.
  • Trim spaces at line ends — removes spaces and tabs at the start and end of every line.
  • Collapse multiple spaces — two or more spaces in a row become one. With trimming off, the spaces that indent a line stay as written; only the runs after its first character collapse.
  • Empty lines — Keep leaves them, Collapse to one reduces each run of blank lines to one, so paragraphs stay separated by a single blank line, and Remove deletes them all. Lines with only spaces count as blank.

Every option is on by default, with empty lines removed. Windows and old Mac line endings, line and paragraph separators (U+2028, U+2029), vertical tabs and form feeds become standard line breaks either way.

Under the cleaned text, Spaces removed counts the spaces, tabs and zero-width characters taken out, line breaks aside, and Lines removed counts the lines that are gone.

Examples

With the default options

Text
  Hello    world		again  


Second   line 
Revealed
··Hello····world→→again··↵
↵
↵
Second···line·
Cleaned
Hello·world·again↵
Second·line

Shown with · for a space, → for a tab and ↵ for a line break.

See also