JSON String Escape / Unescape
Escape text into a JSON-safe string (quotes, backslashes, newlines) or unescape a JSON string back to raw text. Free and private, right in your browser.
Turn raw text into a properly escaped JSON string (or reverse it) so you can paste log lines, code snippets, or messy copy straight into a JSON payload, config file, or API request without breaking on quotes, backslashes, or newlines.
How to use it
- Paste your raw text or an existing JSON string
- Choose Escape (text to JSON string) or Unescape (JSON string to text)
- Copy the converted result
Frequently asked questions
- What does escaping actually change?
- It wraps your text in double quotes and backslash-escapes characters that break JSON strings: " becomes \", a backslash becomes \\, and real newlines/tabs become \n/\t. The result is safe to drop straight into a JSON document or an API payload.
- Why does unescaping fail on my input?
- Unescape expects a valid JSON string literal, including the surrounding quotes. A stray unescaped quote, a lone backslash, or a \u sequence with fewer than 4 hex digits will throw a parse error. Fix that character and re-run.
- Does this handle Unicode and emoji?
- Yes. Escaping can output \uXXXX sequences for non-ASCII characters (useful for strict ASCII-only JSON), and unescaping correctly decodes \uXXXX pairs back into the original characters, including surrogate pairs for emoji.
- Is my text sent anywhere?
- No. The escaping and unescaping happens entirely in your browser, so pasted API keys, log lines, or config values never leave your machine.
- 1
Nothing is uploaded
The file never leaves your device. There is no server to send it to, so there is nothing to leak, log, or subpoena.
- 2
No signup, no limits
No account, no email, no daily cap, no watermark, and no paid tier waiting behind the third file.
- 3
Works offline
Load the page once and it keeps working with the network off, because all the work was always happening locally.