Skip to content
Utilio

Text cleaner

Paste text copied from a PDF, a web page or an email and tidy it up: no extra spaces, no empty lines or invisible characters, plus whichever options you choose.

  • Free
  • No sign-up
  • In your browser
Spaces and lines
Characters

How to use this tool

  1. Paste the text into the top box.
  2. Review the options. The safest ones are on by default: trim spaces at the start and end of each line, collapse repeated spaces, convert tabs and remove invisible characters.
  3. Turn on the others if you need them: remove empty lines, join everything into one paragraph, strip HTML tags, simplify quotes and dashes, remove accents or remove emoji.
  4. Check the result and the summary of changes, then copy it or download it as a .txt file.

What each option does

The options are always applied in the same order, so the result is predictable:

  • Trim spaces on each line: removes spaces and tabs at the start and end of every line, and blank lines at the start and end of the text.
  • Collapse repeated spaces: leaves a single space wherever there were two or more in a row.
  • Tabs to spaces: replaces each tab with a space.
  • Remove empty lines: deletes blank lines. Use it carefully if the text has paragraphs separated by an empty line.
  • Join into one paragraph: joins all lines with a space. Useful for text copied from a PDF, which often arrives broken at the end of every line.
  • Strip HTML tags: removes tags (<p>, <strong>, <a>…), comments and script and style blocks, turns breaks (<br>, end of paragraph) into line breaks and decodes entities such as &nbsp; or &eacute;.
  • Plain quotes and dashes: replaces curly quotes (“ ”, ‘ ’) with straight ones, em and en dashes with a regular hyphen, and the ellipsis character (…) with three dots.
  • Remove accents: removes accents and other diacritics from Latin letters (é → e, ñ → n, ç → c).
  • Remove emoji: removes emoji, including skin tones, flags and compound emoji. The ©, ® and ™ symbols are kept.

Invisible characters: the problem you can't see

When you copy text from a web page, a PDF or a word processor, characters you can't see sometimes come along: zero-width spaces, the BOM mark at the start of some files, soft hyphens or non-breaking spaces. They cause hard-to-find errors, such as searches that don't find a word, spreadsheet formulas that fail, or two seemingly identical texts that a program treats as different.

The invisible-characters option removes zero-width spaces, word joiners, the BOM, soft hyphens and text-direction marks, and turns non-breaking spaces and other special spaces into ordinary spaces. It doesn't touch the zero-width joiner (ZWJ), because it's part of many emoji and of some writing systems.

When to remove accents

Removing accents can be necessary for file names, web addresses, usernames or older systems that don't accept accented characters, for example when a name like “José Muñoz” has to become “Jose Munoz”.

Keep in mind that in names and in many languages the accents matter, so only use this option when the destination requires it.

Examples

Text copied from a PDF

Turn on “Join into one paragraph”: the broken lines are joined into a continuous paragraph, with a single space between words.

Content copied from a web page with HTML

With “Strip HTML tags”, “<p>Hello&nbsp;<b>world</b></p>” becomes “Hello world”.

Names for files or URLs

With “Remove accents”, “Résumé – Zoë Muñoz” becomes “Resume – Zoe Munoz”. Add “Plain quotes and dashes” to turn the dash into a regular hyphen too.

Frequently asked questions

Is the original text changed?

No. The text you paste stays as it is in the top box and the cleaned result appears in the bottom one, so you can change the options and compare.

Why aren't empty lines removed by default?

Because many texts separate paragraphs with a blank line, and removing them would run everything together. Turn it on only if your text doesn't need them.

Does stripping HTML tags run the code I paste?

No. Tags are removed with text rules: the content is never interpreted as a web page, so no script runs.

Which characters does “Remove accents” change?

It removes accents and other diacritics from Latin letters (é, ü, ç, ñ, å…). Letters without a decomposition, such as ø, æ or ß, and other scripts such as Greek or Cyrillic, are left unchanged.

Is my text sent to a server?

No. The cleanup happens in your browser and the text isn't sent to any server or stored.

This page is also available in: Español, Português, Français