Free · No sign-up · Runs in your browser

Online Text Cleaner

Clean messy copied text in one click.

Fix extra spaces, broken lines and unwanted formatting. Your words stay yours, and the text never leaves your browser.

Choose a starting point

Pick where your text came from. You can fine-tune it later.

Cleaning preset

Conservative whitespace cleanup: extra spaces, trailing spaces, non-breaking spaces and surplus blank lines. Words and punctuation are not changed.

Add your text

Paste it here and clean it in one click.

0 characters 0 words 0 lines

Paste your text, pick a preset and press Clean Text.

Fine-tune your clean Optional controls for specific formatting issues

Whitespace

Turns two or more spaces in a row into one. Indentation at the start of a line is left alone.
Removes invisible spaces and tabs at the end of every line. Indentation is kept.
Keeps one blank line between paragraphs and removes the extras.
Converts non-breaking spaces (U+00A0, U+202F, U+2007) to ordinary spaces so they search, split and collapse normally.

Line Breaks

Every line stays where it is.
Lines inside a paragraph are joined with a space. Blank lines still separate paragraphs, and list items stay on their own lines.
Everything becomes one block of text. Paragraphs are merged.
Lines are joined with nothing between them, so the last word of one line touches the first word of the next.

Characters

Removes the invisible zero-width space (U+200B) and word joiner (U+2060).
Removes the invisible U+FEFF character sometimes left at the start of files.
Removes invisible “may break here” hints (U+00AD) left by word processors and PDFs.
Removes non-printing control codes. Manual line breaks from Word and form feeds become normal line breaks.

Markup

Removes tags and keeps the text. Script and style contents are dropped; paragraphs and <br> become line breaks. Addresses in angle brackets, such as <name@example.com>, are kept.
Turns codes such as &amp; &nbsp; and &#8217; back into the characters they stand for.
Removes the # symbols at the start of heading lines. The heading text stays.
Removes ** __ * and _ around emphasised words. snake_case names, arithmetic such as 2**8 and horizontal rules are left alone.
Advanced Cleaning Options
Whitespace

Removes spaces and blank lines before the first character and after the last one. A tab at the very start is kept so tab-separated rows stay aligned.

Removes spaces and tabs from both the start and the end of every line, including indentation.

Replaces each tab character with a single space. Leave off for tab-separated data.

Deletes every blank line, so paragraphs are no longer separated.

Line Breaks

Only applies when lines are being joined. Merges “exam-” + “ple” into “example”. It cannot tell a split word from a real compound such as “well-known”, so read the result.

Typography

Converts curly double quotes (“ ” „) to the plain " character.

Converts curly apostrophes and single quotes (‘ ’) to the plain ' character.

Replaces – with a hyphen, for example in number ranges.

Replaces — with a single hyphen. Unspaced dashes become word-word, so read the result.

Replaces the single … character with three full stops.

Markup

Removes ``` fence lines and the backticks around inline code. The code itself is not changed.

Removes the leading -, *, + or number from list items. Numbered steps lose their numbers.

Characters

Combines a letter and its separate accent into one character. The text looks the same but compares reliably.

Risky: these invisible joiners hold emoji sequences together and are required in Persian, Arabic and several Indic scripts. Only use on plain English text.

Lists

Keeps the first occurrence of each line and preserves the original order. Blank lines are never treated as duplicates.

Letter Case

Leave on “Keep case” unless you need a single case throughout.

Find & Replace

Off by default: the Find text is matched exactly as typed. When on, ^ and $ match at the start and end of each line, and in Replace with you can use $1 for a group, \n for a line break and \t for a tab. Find & Replace runs after all other cleaning, and its fields are never saved.

Your clean result

Ready to copy, compare or download.

Text Statistics

  • Words 0
  • Characters 0
  • Lines 0
  • Paragraphs 0

Processed locally in your browser — your text is not uploaded. How it works

A text cleaner that fixes formatting, not wording

Text picks up clutter every time it is copied: doubled spaces, lines broken in the middle of a sentence, invisible characters, leftover HTML or Markdown symbols. This tool removes that clutter and leaves the words exactly as you wrote them. It does not correct grammar, rephrase sentences or rewrite anything.

The default General Clean preset is deliberately cautious. It tidies whitespace and nothing else, so it is safe to run on almost any text. Anything that could change how your text reads — joining lines, straightening quotes, stripping markup, removing duplicate lines — is a separate option that you switch on yourself.

Common cleanup problems it fixes

  • Extra spaces and trailing spaces

    Double spaces between words and invisible spaces at the ends of lines are collapsed and trimmed. More on spaces and tabs.

  • Lines broken mid-sentence

    Text from PDFs and emails often has a hard line break at the end of every visual line. The PDF Copy preset joins them and keeps your paragraphs. Fixing PDF text.

  • Too many blank lines

    Runs of empty lines are reduced to a single blank line, so paragraphs stay separated but compact.

  • Non-breaking spaces

    They look like ordinary spaces but break searching, sorting and formulas. They are converted to normal spaces. What a non-breaking space is.

  • Hidden characters

    Zero-width spaces, byte order marks and soft hyphens can be removed on request. Invisible characters explained.

  • Leftover HTML

    Tags are stripped and entities such as &amp; are decoded, leaving readable plain text. HTML to plain text.

  • Markdown symbols

    Heading hashes, bold and italic asterisks and code fences can be removed while the words stay put. Removing Markdown formatting.

  • Smart quotes and dashes

    Curly quotes, long dashes and the ellipsis character can be converted to plain keyboard characters when a form, spreadsheet or code file needs them. Smart vs straight quotes.

Before and after

The same text before and after General Clean. Every word and punctuation mark is untouched; only the spacing changed.

Before
   Quarterly   report  —  draft   



Sales grew   by 12%  in the   north region.    
The  team   plans to open   two new   stores.




Next review:   15 March.   
After — General Clean
Quarterly report — draft

Sales grew by 12% in the north region.
The team plans to open two new stores.

Next review: 15 March.
  • Leading/trailing whitespace trimmed
  • 2 lines trimmed
  • 18 extra spaces removed
  • 5 blank lines collapsed

How the Text Cleaner works

  1. Paste your text

    Paste into the Input Text box, or press Paste to read the clipboard. Load Sample shows a typical mess.

  2. Choose a preset

    Start with General Clean. Pick PDF Copy, Word / Docs, Plain Text or AI Formatting when the text came from one of those places, or open Advanced Cleaning Options to switch individual steps on and off.

  3. Press Clean Text

    The result appears beside the original with a short list of what was changed — for example how many extra spaces were removed. Nothing is listed unless it actually happened.

  4. Copy or download

    Copy the result, download it as a .txt file, or move it back to the input to run a second pass with different options.

Cleaning steps always run in the same fixed order, so the same text and options give the same result every time. The full order, and what happens to your text while it is processed, is described on the How It Works page.

Common use cases

  • Writers and editors

    Tidy a manuscript or article before it goes into a publishing system. The text cleanup checklist walks through it in order.

  • Students and researchers

    Reflow quotations copied from PDF papers so they sit properly inside your own paragraphs.

  • CMS and blog users

    Clean text from Word or Google Docs before pasting, so stray characters do not end up in the published page.

  • Spreadsheets and data entry

    Remove the hidden spaces that make lookups fail, and de-duplicate lists. Cleaning text for spreadsheets.

  • Developers

    Replace curly quotes that break code, strip zero-width characters and normalise line endings.

  • Chat assistant output

    Remove the Markdown markers left behind when an answer is pasted somewhere that does not render them. Cleaning AI output formatting.

Guides to cleaning text

Short, practical explanations of the problems this tool solves and how to fix them by hand when you need to.

Browse all 20 guides

Frequently asked questions

Is the text I paste sent to a server?

No. The cleaning code runs inside your browser, and the text stays in the page. It is not uploaded, logged or saved. Only your option choices, such as which preset is selected, are remembered in your browser so they are there next time. See How It Works and the privacy policy.

Will it change my words?

No. It changes spacing, line breaks and formatting characters. It does not paraphrase, correct spelling or alter meaning. Options that could affect how text reads, such as changing letter case or removing list numbers, are off until you switch them on.

What exactly does General Clean do?

It converts non-breaking spaces to ordinary spaces, trims spaces from the ends of lines, collapses repeated spaces inside lines, reduces runs of blank lines to one, and trims the start and end of the text. It leaves punctuation, letter case, emoji, links, email addresses, Markdown and HTML alone.

Why are my line breaks still there?

Removing line breaks can merge paragraphs, lists and addresses, so it is never done by default. Choose the PDF Copy preset to join wrapped lines while keeping paragraphs, or use the dedicated Remove Line Breaks tool for more control.

Does it keep emoji and accented letters?

Yes. Letters from any language, accents and emoji are preserved. The invisible joiner characters that hold some emoji and scripts together are also left in place unless you explicitly choose to remove them.

Is there a size limit?

There is no fixed limit. Text is processed on your own device, so very large documents depend on its memory and speed. For large inputs the result updates when you press Clean Text rather than after every option change.

Can I undo a clean?

Your original text stays in the Input Text box, so nothing is lost by cleaning. Clear, Load Sample and Move Result to Input each offer a one-step Undo.