JSON Escape / Unescape
Escape text into a safe JSON string, or unescape a JSON string back to plain text — quotes, tabs, and newlines handled both ways. Runs in your browser. Free.
💡 How to use
- Escape turns raw text into a safe JSON string — quotes, backslashes, tabs, and newlines are escaped.
- Unescape turns a JSON string literal back into the original text.
- Runs in your browser — nothing is uploaded.
Free JSON Escape / Unescape Tool
Escape text into a safe JSON string, or unescape a JSON string back to plain text. Quotes, backslashes, tabs, newlines, and Unicode are handled correctly, in both directions, with one-click copy. Runs entirely in your browser. Free, no sign-up.
What does escaping JSON mean?
JSON strings must follow strict rules: certain characters — double quotes, backslashes, tabs, newlines, and other control characters — cannot appear literally and must be written with a backslash escape. Escaping takes raw text and converts those characters into their safe form (for example a newline becomes \n and a quote becomes \"), so the text can be dropped into a JSON value without breaking it.
Escape vs unescape
The tool works both ways:
- Escape — turn raw text into a JSON-safe string, ready to paste into a JSON file or code.
- Unescape — take an escaped JSON string and recover the original text, with real newlines and quotes.
- Wrap-in-quotes option — include or omit the surrounding double quotes when escaping.
- Swap — flip the input and output to reverse a conversion instantly.
How to use the JSON escape tool
It is instant:
- Choose Escape or Unescape.
- Paste your text or JSON string.
- The result updates live and can be copied.
- Use Swap to send the output back as new input.
Which characters get escaped
Standard JSON escaping covers the double quote, the backslash, and control characters: newline, carriage return, tab, backspace, and form feed each get a two-character backslash sequence, and other control characters become \u00XX Unicode escapes. Regular letters, digits, spaces, and most symbols — including emoji — are left as-is, since valid JSON is UTF-8 and does not require escaping them.
Common uses
Escaping JSON comes up whenever text has to live inside a JSON string:
- Embedding a block of text, HTML, or code into a JSON config or API payload.
- Fixing a value that breaks your JSON because of an unescaped quote.
- Reading a log or API response where the message is an escaped string.
- Preparing multi-line content to store in a single JSON field.
Pro tip
If your whole document is JSON rather than a single string, format and validate it with a JSON formatter first, then use this tool only for the specific string value you need to escape or read. To pretty-print or validate full JSON, see our JSON Formatter.
FAQ
Is this JSON escape tool free and private?
What is the difference between escaping and unescaping JSON?
Which characters does JSON escaping change?
Can I escape without the surrounding quotes?
Why does my JSON string fail to unescape?
Does it handle newlines and tabs correctly?
Is this the same as a JSON formatter?
Related tools
Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.