JSON Escape / Unescape — Free Online
Escape any string into a valid JSON string literal, or unescape a JSON string back to plain text. Handles \n, \t, \u, and quotes.
Escape any string into a valid JSON string literal, or unescape a JSON string back to plain text. Handles newlines, tabs, quotes, backslashes, and \u00XX Unicode escapes — both directions, no signup, no server upload.
Need to inspect the string inside a larger JSON document? JSON Formatter validates and pretty-prints. Want to extract just one path? JSONPath Tester.
How to Escape / Unescape JSON Strings
Pick a direction
Escape converts plain text to a JSON-string literal. Unescape converts a JSON literal back to plain text.
Paste your string
Paste plain text (escape mode) or a quoted/escaped string (unescape mode) into the input.
Convert and copy
Click Convert; copy the result with one click.
When Do You Need to Escape JSON Strings?
Embedding multi-line text in a JSON value: You have a SQL query, a Markdown blob, or a YAML snippet. Escape it once and paste the result into a JSON field.
Reading escaped log output: Logs often serialize errors as JSON-encoded strings — full of \\n and \\". Unescape to read them as the actual newlines and quotes.
Stringifying JSON-in-JSON: Some APIs accept a JSON document as a string field inside another JSON. Escape your inner JSON, then drop the result in.
Building shell scripts that POST JSON: Bash heredocs, Make targets, and Dockerfile RUN steps need careful escaping. Escape your payload here first.
Why Use PDFFlare for JSON Escape?
Both Directions
Escape and unescape in one tool with a dropdown. No second site needed.
Unicode Aware
Handles \u00XX escapes both directions. Your é round-trips cleanly.
100% Browser-Based
Your strings stay on your device. Safe for tokens, secrets, or anything sensitive.
No Signup Required
Open, paste, click. Zero friction.