Escape / Unescape
JSON Escape / Unescape
RFC 8259 string escaping both ways — make any text safe inside a JSON string, or decode the backslash soup back to text.
In short
Escape and unescape JSON string content online: quotes, backslashes, newlines and control characters per RFC 8259 — both directions, instantly.
By NaveenKumar T · Updated
- Escape & unescape in one tool
- Handles every special character
- Instant as you switch modes
Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →
Example
JSON Escape: input and output
Multi-line release notes being placed in a JSON "body" string.
Release notes v2.1
- Fixed "Save as…" on Windows (C:\Users\…)
- New /api/v2 endpoint (beta) — merci, Édouard 🎉Release notes v2.1\n- Fixed \"Save as…\" on Windows (C:\\Users\\…)\n- New /api/v2 endpoint\t(beta) — merci, Édouard 🎉The quotes, the backslashes, the line breaks and the tab were escaped; the accented É, the ellipsis, the em dash, the emoji and the slashes in /api/v2 all appear verbatim.
Learn more
JSON escaping rules
JSON strings allow exactly these escapes: \" \\ \/ \b \f \n \r \t and \uXXXX — nothing else, and all control characters below U+0020 MUST be escaped. This tool escapes with the engine's own serializer, so the result is guaranteed valid inside any JSON string field, in every parser, in every language.
Unescape mode parses the escaped content back to plain text and tells you when the input isn't actually a valid escaped string (the usual culprit: copying half of a double-escaped value). For full documents-inside-strings, the String to JSON converter goes one step further and parses the result as JSON too.
Help
Frequently asked questions
Everything you need to know about the JSON Escape.
01How do I escape or unescape JSON here?
Paste your text, pick Escape or Unescape in the Mode select, and press Convert. Escape uses the engine's own JSON serializer so the result is guaranteed valid inside any JSON string; Unescape parses escaped content back to plain text and flags input that isn't a valid escaped string.
02When do I need JSON escape rather than just writing the text?
Whenever text crosses INTO a JSON string by hand: building payloads in shell scripts or templates, embedding messages with quotes/newlines in config, or fixing a value inside an existing document. Anything with a " or a line break will silently corrupt the JSON unless escaped first.
03Does JSON escape turn é or emoji into \u sequences, and does it escape forward slashes?
No to both. The tool uses JSON.stringify, which leaves every printable Unicode character as-is — JSON is UTF-8 by specification, so \u00e9 and é are equivalent and the readable form wins. Forward slashes stay bare as well: escaping / is optional in RFC 8259 and only mattered for embedding JSON inside <script> tags. Unescape still understands both \/ and \uXXXX from other serializers, and it accepts the value with or without its surrounding quotes.
Keep working
Related tools
JSON Stringify Online
The exact behavior of JavaScript's JSON.stringify() — compact by default, the space argument, and what the serializer silently drops — plus a mode that reverses it.
String to JSON
Paste an escaped JSON string — with all its backslashes — and get the real, formatted JSON back.
JavaScript Escape
Escape / Unescape
JSON Formatter
Format, beautify, and validate JSON instantly in a professional VS Code-style editor — free, fast, and 100% private.
.NET Escape
Escape / Unescape
HTML Escape
Escape / Unescape
Learn the format
Related guides
How to POST JSON with curl (Without Quoting Pain)
POST JSON with curl correctly: the Content-Type header, shell quoting on Linux/Mac vs Windows, sending from files with @, and pretty-printing responses.
2 min readGuide · Developer ToolsFreeFormatter Alternatives (2026): Where Its Tools Went
FreeFormatter.com has been retired and its tool pages now return 404. A verified map of where each formatter, validator, escaper and encoder moved.
6 min read