Copy and paste clean-up
Fix text copied from PDFs, emails and web pages that arrives with double spaces, odd gaps and ragged line breaks.
Paste your text and clean it in one step: trim lines, collapse double spaces, delete blank lines, join lines into one, or strip invisible characters that break searches and imports. See how many characters were removed, then copy or download the result. Your text never leaves your browser.
Learn what each cleaning option does and how to fix pasted text for good.
Whitespace is every character that shows as empty space: spaces, tabs, line breaks and some invisible characters. Extra whitespace sneaks in when you copy text from a PDF, a web page, an email or a spreadsheet, and it can break forms, code, CSV files and search matches.
This tool cleans it up in one step. Tick the options you need, or use a preset such as Tidy up. The result updates as you type and shows exactly how many characters were removed. After cleaning, you can switch the capitalization with the Case Converter or count the result with the Word Counter.
Fix text copied from PDFs, emails and web pages that arrives with double spaces, odd gaps and ragged line breaks.
Trim values before pasting them into forms, spreadsheets, CSV files, config files or database imports.
Turn hard-wrapped lines into a single paragraph, or remove stray blank lines from a draft.
Removes spaces and tabs at the start and end of every line, or at the start and end of the whole text.
Turns any run of two or more spaces or tabs into a single space. A single space is left alone.
Deletes every space and tab but keeps line breaks. Useful for phone numbers, codes and IDs.
Delete all blank lines, reduce a run of blank lines to one, or join every line into one line with a space or nothing between them.
Removes zero-width spaces, soft hyphens and byte-order marks, and turns non-breaking and other special spaces into normal ones.
Swaps each tab character for a single space, so columns of text no longer jump around.
Excel’s TRIM removes ordinary spaces but not non-breaking spaces (character 160), which is why copied web data often still looks padded. Tick the hidden characters option here to fix those too.
Your text is cleaned in your browser. It is never sent to our server or saved. Only your chosen options are remembered on your device.
The tool works on plain text. It does not preserve formatting such as bold or tables, and it cannot tell intentional spacing, like code indentation or poetry, from accidental spacing.
Paste the text, then tick Replace multiple spaces with one, or press the Tidy up preset. Every run of two or more spaces becomes a single space and the result appears instantly.
Tick Remove all spaces and tabs, or press the Remove all spaces preset. Spaces and tabs are deleted, and your line breaks stay in place.
Tick Delete blank lines to remove every empty line, or Reduce several blank lines to one to keep single gaps between paragraphs. Lines that contain only spaces count as blank.
Yes. Tick Join all lines into one and choose whether to separate them with a space or nothing. Blank lines are dropped when joining.
Zero-width spaces, soft hyphens and similar characters take up no visible room, but they can break searches, comparisons, URLs and code. The hidden characters option removes them and turns non-breaking spaces into normal spaces.
TRIM only handles the normal space character. Text copied from web pages often contains non-breaking spaces, character 160, which TRIM ignores. This tool converts them to normal spaces when the hidden characters option is on.
Windows and old Mac line endings are normalized to a single newline in the result, which works everywhere. The text content itself is not otherwise changed unless you choose an option.
No. Your text is cleaned in your browser and never leaves your device. Only your chosen options are remembered for next time.
The homepage features dozens more free tools that don't require an API key.
Compare two texts line by line to see what has changed.
Open toolEstimate the reading time of an article at any reading speed.
Open toolGenerate random v4, time-ordered v7 and name-based v5 UUIDs in bulk.
Open toolConvert length, area, volume, speed, temperature, time, data and more.
Open toolNo matching question.
Share your thoughts on this tool with other visitors.