JSON Escape Unescape
Escape raw text as a JSON string or unescape a JSON string value.
Escape and unescape JSON strings
Embedding text inside a JSON string means escaping quotes, backslashes, and newlines; reading an escaped value means reversing it. This tool does both — turn raw text into a valid JSON string, or unescape a JSON string back into readable text.
It saves the error-prone manual work of escaping a payload to paste into a config, or decoding an over-escaped value you copied from a log. Paste your text, pick the direction, and copy the correctly escaped or unescaped result.
Both directions, locally
It escapes quotes, backslashes, and newlines to embed text in a JSON string, and reverses that to read one. The transform runs in your browser and never uploads anything.
Frequently asked questions
What does escaping for JSON do?
It wraps your text in quotes and escapes quotes, backslashes, and line breaks, so it can be placed inside a JSON document.
How do I unescape a JSON string?
Switch to unescape and paste the quoted string, like "line one\nline two". You get the plain text back.
Why do I get an invalid JSON string error?
Unescaping needs the surrounding double quotes and valid escapes. A lone backslash or missing quote causes the error.
Related tools
Practical utilities for everyday web development work.