Sign up free

Free Online Text Cleaner

Tidy text copied from PDFs, web pages and emails, and watch the clean version appear as you tick options.

About Text Cleaner

Use this text cleaner on text that pastes badly from a PDF, a web page or an old email: sentences broken mid-line, doubled spaces, piles of blank lines and invisible characters that trip up search and spreadsheets. Tick what to fix and the clean version appears next to the original as you go.

Trim each line, Collapse repeated spaces, Remove empty lines and Remove invisible characters are on from the start. Join broken lines repairs the hard line breaks PDFs put in the middle of sentences, adding a space for English and none for Chinese. You can also strip HTML tags, turn full-width letters and digits into normal ones, or put everything on one line. A counter shows the character count before and after. Repeated lines are a separate job for Remove Duplicate Lines.

How to use Text Cleaner

  1. 1
    Paste the messy text

    Paste into Input, or open a TXT, CSV, HTML or subtitle file.

  2. 2
    Tick the fixes

    Keep the defaults or add Join broken lines, Remove HTML tags, Full-width to half-width or Everything on one line.

  3. 3
    Check the result

    The text cleaner updates Result instantly and shows the character count before and after.

  4. 4
    Copy or save

    Click Copy, or Save to download it as a text file.

Why use Cubfile for this

  • Eight cleaning options

    Spaces, blank lines, line breaks, HTML, full-width characters and invisible characters, each on its own switch.

  • Fixes PDF line breaks

    Lines that end mid-sentence are joined, while real paragraph ends stay put.

  • Invisible characters removed

    Zero-width spaces, stray byte-order marks and soft hyphens are taken out.

  • Live before and after

    Every tick updates the result immediately, with a character count for both versions.

FAQ

Text Cleaner: questions and answers

How does the text cleaner fix line breaks from a PDF?
Tick Join broken lines. A line that doesn't end with a full stop, question mark, colon or similar is joined to the next, so sentences flow again while paragraph ends remain.
What are invisible characters, and why remove them?
Zero-width spaces, byte-order marks and soft hyphens don't show on screen but break searches, formulas and code. Remove invisible characters, on by default, takes them out. Files that open as garbled characters need a different fix: Text Encoding Converter converts them to UTF-8.
Will Full-width to half-width change Chinese punctuation?
Partly. Full-width commas, brackets and colons become their English forms, while the Chinese full stop stays. Leave it off for Chinese prose and use it for full-width letters and digits.
Can the text cleaner remove HTML tags?
Yes. Remove HTML tags drops scripts, styles and tags, turns paragraph and line-break tags into new lines, and converts common entities such as the non-breaking space back to normal characters.
Is my text sent anywhere?
No. Cleaning happens in your browser and doesn't count toward any limit. A draft is kept in this browser until you click Clear.
Share Text Cleaner with a friendIt runs in any browser, and they can try it without signing up.

Related tools

JSON JSON FormatterFormat, validate and minify JSON, errors pointed out by line.
TXT Text CompareCompare two texts side by side and see every change.
TXT Word CounterCount words, characters, Chinese characters, lines and reading time live.
TXT Base64 Encode and DecodeEncode and decode Base64 text and files.
AaTXT Case ConverterUPPER, lower, Title, Sentence, camelCase, snake_case and more.
TXT Find and Replace TextReplace words in text in bulk, with regular expressions if you need them.
TXT Password GeneratorMake strong random passwords on your device.
TXT Remove Duplicate LinesDelete repeated lines and sort what’s left.