Clean Up Text

Inputs

Fix

Results

What changed

    Text copied from Word, Google Docs, PDFs or web pages often carries characters you can’t see: curly quotes that break code, non-breaking spaces that stop search-and-replace, zero-width spaces that make two identical words compare different. This tool finds them, fixes them and tells you how many it changed.

    How to use it

    1. Paste your text.
    2. Untick any fix you don’t want.
    3. Copy the cleaned text.

    Example: “Hello” world — it’s (with curly quotes, two spaces and an em dash) becomes “Hello” world - it’s: 3 quotes straightened, 1 dash replaced and 1 run of spaces shortened.

    Questions and answers

    What are invisible characters?

    Characters that take no space on screen: zero-width spaces, word joiners, soft hyphens and byte-order marks. They come along when copying from web pages or PDFs and can break searches, passwords and code.

    Why replace curly quotes?

    Code, command lines, CSV files and many systems expect straight quotes. Curly quotes pasted from a document make code fail in ways that are hard to see.

    Are line breaks kept?

    Yes. Single line breaks and paragraphs stay as they are; only runs of more than one blank line are reduced, if that option is on.

    Link with pre-filled values

    Add # and these parameters to the end of this page's address to open the tool with values already filled in.

    ParameterWhat it sets
    textThe text to clean.
    quotes1 to straighten curly quotes, 0 to keep them.
    dashes1 to replace long dashes and ellipses.
    spaces1 to turn special spaces into normal ones.
    invisible1 to remove invisible characters.
    trailing1 to remove spaces at line ends.
    collapse1 to shorten runs of spaces.
    blank1 to allow at most one blank line in a row.
    tabs0 to keep tabs, or 2 or 4 spaces per tab.

    Example: https://toolabelle.com/clean-text/#text=%E2%80%9CHello%E2%80%9D++world&quotes=1&dashes=0&spaces=1&invisible=1&trailing=1&collapse=1&blank=1&tabs=4

    Related tools