Text Cleaner

Clean text with toggleable options.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste messy text, switch on the clean-ups you want and press Run. Trim lines and Collapse spaces are on by default; seven other options are off until you enable them.

How to use

1
Step 1
Paste the text into Input.
2
Step 2
Turn on the clean-ups you need: Trim lines, Collapse spaces, Remove empty lines, Remove HTML, Remove URLs, Remove emails, Remove emojis, Strip Markdown or Lowercase.
3
Step 3
Press Run and copy the result.

How it works

The options run in a fixed order: HTML, then Markdown, URLs, emails and emojis are removed first, then spaces are collapsed, empty lines are dropped, lines are trimmed, and lowercase is applied last. Because removals leave gaps, leaving Collapse spaces and Trim lines on cleans up after them.

Worked example

A web paste

Input
Hello <b>World</b> https://x.com bye
Output
Hello World bye
Walkthrough
With Trim, Collapse spaces, Remove empty lines, Remove HTML and Remove URLs on, the tag and link are deleted, spacing is tidied, the blank line goes and each line is trimmed.

Limitations

  • Strip Markdown also removes characters such as hyphens, asterisks, underscores and pipes everywhere in the text; leave it off for normal prose, and check the result by eye.
  • Remove HTML does not decode entities.
  • Options are all-or-nothing for the whole text.

Questions

What does the text cleaner do by default?
It trims each line and collapses runs of spaces. Everything else is off until you switch it on.
In what order are the clean-ups applied?
HTML, Markdown, URLs, emails and emojis first, then spacing, empty lines, trim and lowercase.
Is it safe to use Strip Markdown?
Mostly. It removes Markdown markers, but check the result for any hyphens or underscores you wanted to keep.

Features

  • Nine switchable clean-ups
  • Fixed, predictable order
  • Runs in your browser

Guides

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • HTML in 100 Seconds

    Fireship

    Quick HTML mental model next to text transform tools.

    Watch on YouTube
  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    Structured text formats often sit next to plain-text tools.

    Watch on YouTube