Your text never leaves your browser. All processing happens locally using JavaScript — no server requests, no data collection, no cookies.
Paste messy text.
Get clean text. Instantly.
Free online tool to clean text, format JSON, and beautify SQL. Remove smart quotes, zero-width characters, non-breaking spaces, and invisible Unicode formatting — all in your browser, 100% private, nothing sent to any server.
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
Smart Quotes
Curly quotes from Word, PDFs, and websites replaced with straight quotes that work everywhere.
Extra Whitespace
Double spaces, non-breaking spaces, extra blank lines, and trailing whitespace cleaned up.
Fancy Dashes
Em-dashes and en-dashes from word processors converted to regular hyphens.
Optional Rules
Zero-Width Characters
Invisible characters that break string comparisons and cause mysterious syntax errors.
BOM Markers
Byte Order Mark at the start of files that causes “invalid character” errors in code.
Soft Hyphens
Invisible hyphens from PDFs that appear as garbled characters in code editors.
Common sources of these problems
What gets formatted
Formatting
- Pretty-print with customizable indentation (2 or 4 spaces)
- Minify JSON (remove all whitespace)
- Syntax validation with helpful error messages
- Line numbers for easier debugging
Auto-Fix
- Single quotes → double quotes ('key' → "key")
- Trailing commas removed ({"key": "value",} → {"key": "value"})
- Unquoted keys fixed ({key: "value"} → {"key": "value"})
- Handles large JSON files (10,000+ lines)
What gets formatted
Formatting
- UPPERCASE keywords (SELECT, FROM, WHERE)
- Proper indentation for nested queries
- Line breaks between clauses
- Aligned column lists
Dialect Support
- MySQL — Most popular open-source database
- PostgreSQL — Advanced open-source with JSON support
- BigQuery — Google Cloud data warehouse
- SQLite — Lightweight embedded database
- T-SQL — Microsoft SQL Server
- Standard SQL — ANSI SQL for any database
What gets formatted
Formatting
- Pretty-print with 2 or 4 space indentation
- Normalize self-closing tags
- Collapse inline content
- Handles large XML files
Common Formats
- SOAP envelopes and API responses
- RSS and Atom feeds
- Maven POM and Spring configs
- Android manifests
- SVG markup
What gets formatted
Formatting
- Normalize indentation (2 or 4 spaces)
- Fix mixed tabs and spaces
- Validate structure and report parse errors
- Consistent quoting style
Common Formats
- Kubernetes manifests (Pod, Deployment, Service)
- Docker Compose files
- GitHub Actions workflows
- Helm chart values
- Ansible playbooks
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. Unformat detects and strips BOM markers in Developer mode with zero configuration.
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. Unformat's Developer mode replaces all four curly quote variants with ASCII straight quotes in one paste.