Text Cleaner

Paste messy text and tidy it up in one go. Strip out extra spaces, tabs, blank lines, duplicate lines and hidden characters, and pick as many of the fixes as you need. It all happens live in your browser.

Nothing to clean yet.

Clean up messy text in your browser

Text copied from PDFs, emails, web pages and chat apps often arrives full of junk: double spaces, stray tabs, empty lines, repeated lines and hidden characters you cannot even see. This tool clears all of that out. Tick the fixes you want, and they are applied together the moment you paste or type. Everything runs on your own device, so your text is never uploaded.

How to clean your text

  1. Paste your text. Drop it into the top box.
  2. Choose your fixes. Tick any combination of the cleanup options. The result updates live.
  3. Copy or download. Take the cleaned text with the copy button, or save it as a text file.

What each option does

  • Remove extra spaces strips the spaces and tabs at the start of each line, so indented text lines up on the left.
  • Remove duplicate spaces turns runs of two or more spaces into a single space.
  • Remove tabs replaces every tab character with one space.
  • Remove trailing whitespace clears the spaces and tabs left hanging at the end of each line.
  • Remove blank lines deletes empty lines, including lines that only contain spaces.
  • Remove non-breaking spaces converts non-breaking spaces and other unusual space characters into ordinary spaces.
  • Remove invisible characters strips out zero-width spaces, byte-order marks, soft hyphens and text-direction marks that hide inside pasted text.
  • Remove duplicate lines keeps only the first appearance of each line while preserving the original order. You can optionally ignore letter case or trim spaces before comparing lines.

Frequently asked questions

Is my text sent anywhere?

No. All of the cleaning runs in your browser with plain JavaScript. Your text is never uploaded or stored on a server, which keeps it completely private.

What is the difference between "extra spaces" and "duplicate spaces"?

Remove extra spaces clears the indentation at the start of each line. Remove duplicate spaces collapses runs of spaces between words into a single space. You can use them together or on their own.

What counts as an invisible character?

Characters that take up no visible space but can break searching, sorting or layout, such as zero-width spaces and joiners, byte-order marks, soft hyphens, and left-to-right and right-to-left marks. These often sneak in when you copy from websites or documents.

Does removing duplicate lines change the order?

No. It keeps the first time each line appears and removes the later copies, so the order of your text stays the same.

Is it really free?

Yes, it is free with no sign-up, no watermark, and no limits.

Copied