Unformat.online

Paste messy text.
Get clean text. Instantly.

Remove smart quotes, zero-width characters, non-breaking spaces, and invisible Unicode from any text. Everything happens in your browser — 100% private, nothing sent to any server.

Rules:Smart QuotesConverts curly quotes (“” ‘’) to straight quotes. Always active.Non-Breaking SpacesReplaces non-breaking spaces (U+00A0) with regular spaces. Always active.Line EndingsNormalizes CRLF → LF and trims trailing whitespace per line. Always active.Removes invisible zero-width characters (U+200B, U+200C, U+200D) that silently break string comparisons.Strips the Byte Order Mark (U+FEFF) that causes “invalid character” errors in parsers and editors.Removes soft hyphens (U+00AD) from PDFs that show as garbled characters in code editors.Converts mixed tabs/spaces to a consistent indent width. Click to pick a size.Collapses all line breaks into one continuous paragraph. Great for reflowing PDF or email text.Control blank line density. Click to pick Keep 1 or Remove all.Text never leaves your browser
0 characters
🧹

Clean Text

Strip invisible Unicode junk — smart quotes, zero-width chars, BOM markers, fancy dashes — that breaks code, APIs, and databases when copied from Word, Slack, PDFs, or Google Docs.

Always Active

“Hello” → "Hello"
Smart Quotes

Curly quotes from Word, PDFs, and websites replaced with straight quotes that work everywhere.

3 spaces → 1 space
Extra Whitespace

Double spaces, non-breaking spaces, extra blank lines, and trailing whitespace cleaned up.

— and – → -
Fancy Dashes

Em-dashes and en-dashes from word processors converted to regular hyphens.

Optional Rules

U+200B → [removed]
Zero-Width Characters

Invisible characters that break string comparisons and cause mysterious syntax errors.

BOM → [removed]
BOM Markers

Byte Order Mark at the start of files that causes “invalid character” errors in code.

syl­la­ble → syllable
Soft Hyphens

Invisible hyphens from PDFs that appear as garbled characters in code editors.

Common sources of these problems

Word / Google DocsSlackPDFsPython / JavaScriptGmailNotionChatGPT outputExcel / CSV

Unformat handles the invisible Unicode junk that breaks code, databases, and APIs — zero-width characters, BOM markers, smart quotes, non-breaking spaces, and garbled line endings. Here are the most common problems it solves.

How to remove zero-width spaces from text online

Zero-width spaces (U+200B), zero-width joiners (U+200D), and zero-width non-joiners (U+200C) are completely invisible characters that hide inside copied text from websites, PDFs, Word documents, and messaging apps. They inflate character counts, break string comparisons, cause regex matches to fail silently, and corrupt variable names when pasted into code. Paste your text into Unformat and they are stripped instantly — no server, nothing leaves your browser.

Remove zero-width spaces online →

Remove hidden PDF line breaks and clean copied PDF text

When you copy text from a PDF, the PDF renderer inserts a hard line break at the end of every visual line — breaking sentences mid-word and adding soft hyphens where words were hyphenated for layout. The result is choppy, broken paragraphs that require manual cleanup before use in documents, emails, or code. Unformat collapses these fragmented lines back into clean, flowing text.

Remove hidden PDF line breaks →

Clean Slack text formatting and fix copied message junk

Slack automatically converts straight quotes to smart quotes in regular messages, inserts non-breaking spaces in certain positions, and adds zero-width characters around mentions and links. When you copy a Slack message into a code editor, a Jira ticket, or a terminal, these characters travel with it and cause subtle, hard-to-debug failures. Unformat strips all Slack-introduced formatting artifacts in one paste.

Clean Slack text formatting →

Strip BOM marker online — fix byte order mark errors

A Byte Order Mark (BOM, U+FEFF) is an invisible character that Microsoft Word, Windows Notepad, and Excel silently prepend to text. When that text is pasted into a JSON file, shell script, CSV import, or HTTP header, the BOM causes immediate parse failures — the first character of your file is no longer what you think it is. Enable “Sanitize code” in the Options panel and Unformat strips BOM markers instantly.

Strip BOM marker online →

Fix smart quotes in Python, JavaScript, and code editors

Smart quotes (curly quotes) — U+201C, U+201D, U+2018, U+2019 — are silently inserted by Word, Google Docs, Slack, and PDF renderers whenever you type or paste a straight quote. When that text ends up in code, Python raises SyntaxError: invalid character, JavaScript throws unexpected token errors, and shell scripts fail with unrecognized arguments. The characters are nearly invisible in most fonts, making the bug extremely hard to spot. Enable “Sanitize code” in Options and Unformat replaces all curly quote variants with ASCII straight quotes in one paste.

Fix smart quotes in code →