Text Cleaner

Strip extra spaces, blank lines and stray markup in one pass.

Tool Panel

Loading tool...
About Text Cleaner

Trims lines, collapses runs of spaces and merges blank lines. Every rule has its own toggle, so nothing is stripped by surprise.

  • 1

    Four independent switches: trim each line, collapse runs of spaces, delete blank lines, merge consecutive blank lines. Trimming and space collapsing are on by default; blank lines are merged, not deleted.

  • 2

    Collapsing spaces also eats leading indentation (whitespace is squeezed to one space, then trimmed), so indented code gets flattened.

  • 3

    CRLF is normalised to LF first, so Windows line endings never leave stray characters in the result.

Related tools

View all
Word Counter
Text Tools

Word Counter

Count characters, words and lines as you type.

Text Tools
Case Converter
Text Tools

Case Converter

Switch between upper, lower, camel, snake and other case styles.

Text Tools
Text Diff
Text Tools

Text Diff

Compare two texts and highlight exactly what changed.

Text Tools
Find and Replace
Text Tools

Find and Replace

Replace across a whole document, with optional regular expressions.

Text Tools
Remove Duplicate Lines
Text Tools

Remove Duplicate Lines

Drop repeated lines and leave the list unique.

Text Tools
Sort Lines
Text Tools

Sort Lines

Order lines alphabetically, numerically or by length, in either direction.

Text Tools