JSON Escape
Client-sideEscape text into a JSON string literal, or unescape a JSON string back to raw text — instantly and offline.
Processed in your browser — data stays on your device
About JSON Escape
JSON Escape converts raw text into a valid JSON string literal — including quotes, escapes for newlines, tabs, and embedded quotes.
Unescape reverses the process so you can recover readable text from an escaped JSON string, all without sending data to a server.
Features
Escape to JSON string
Produce a quoted JSON string ready to embed in code or payloads.
Unescape literals
Decode escaped sequences back into plain text.
Flexible input
Unescape accepts values with or without surrounding quotes.
Copy & download
Move results into editors, configs, or tickets in one click.
How it works
Paste raw text or an escaped string
Use raw text for Escape, or a JSON string literal for Unescape.
Choose Escape or Unescape
Escape produces a quoted JSON string. Unescape returns the decoded text.
Copy the result
Copy or download the output for use in code or configs.
Example walkthroughs
Multiline text
Newlines, tabs, and quotes become escaped sequences inside a JSON string literal.
Hello World "quoted"
Escaped literal
Unescape restores the original multiline plain text.
"Hello\nWorld\t\"quoted\""
Use cases
Embed strings in JSON configs
Safely encode messages, paths, or templates for JSON documents.
Decode log fragments
Turn escaped log lines back into readable text.
Prepare test fixtures
Generate correctly escaped string values for unit tests.
Frequently asked questions
What does Escape produce?
A valid JSON string literal, including surrounding quotes, with characters like newlines and quotes escaped.
Can I unescape without surrounding quotes?
Yes. If quotes are missing, the tool wraps the value before parsing as a JSON string.
Is this the same as encoding a whole JSON document?
This tool targets string escaping. To format whole documents, use JSON Formatter.
Related tools
JSON Formatter
Format, beautify, and minify JSON in your browser. Free, private, and instant — no upload to a server.
JSON Validator
Validate JSON instantly in your browser. See type, size, and node counts — or exact parse errors with line and column.
JSON Viewer
Explore JSON as an interactive tree with paths, types, and expandable nodes — all processed locally in your browser.
JSON Compare
Compare two JSON documents structurally. Find added, removed, changed, and type-changed paths — privately in your browser.
JSON Diff
Generate a unified diff of two JSON documents after pretty-printing. Ideal for reading line-level changes quickly.