Free JSON Escape / Unescape

Escape special characters for JSON strings or unescape JSON-encoded text. Runs in your browser — your data never leaves your machine.

Text ↔ JSON Escaped
Unescaped Text
JSON Escaped

Special Characters

Automatically escapes all JSON-special characters including double quotes, backslashes, newlines, tabs, carriage returns, backspaces, and form feeds.

Quotes & Newlines

Literal double quotes become \" and newlines become \n, making your text safe to embed as a JSON string value without breaking the syntax.

100% Private

All escaping and unescaping runs locally in your browser using JavaScript. Nothing is sent to a server — safe for sensitive data.

How to Escape and Unescape JSON Strings

Type or paste plain text in the left panel and the JSON-escaped version appears instantly on the right. Special characters like double quotes, backslashes, and newlines are automatically escaped with backslash sequences. To unescape, paste a JSON-escaped string in the right panel and the original text appears on the left.

Understanding JSON String Escaping

The JSON specification requires certain characters to be escaped when they appear inside string values. A backslash (\) serves as the escape character, followed by a specific letter: n for newline, t for tab, r for carriage return, and so on. Double quotes must be escaped as \" since they delimit string boundaries. Without proper escaping, these characters would break the JSON structure and cause parse errors in any JSON consumer.

Frequently Asked Questions

What characters need to be escaped in JSON?
JSON requires escaping double quotes (\"), backslashes (\\), and control characters including newline (\n), carriage return (\r), tab (\t), backspace (\b), and form feed (\f). Unicode characters outside the basic ASCII range may also be escaped as \uXXXX sequences.
How does JSON string escaping work?
JSON escaping prepends a backslash before special characters so they can be safely embedded inside a JSON string value. For example, a literal newline becomes the two-character sequence \n, and a double quote becomes \".
Can I unescape a JSON string?
Yes — the tool is bidirectional. Paste an escaped JSON string in the right panel and the unescaped text appears instantly in the left panel.
Is this tool free?
Yes — completely free, forever. No sign-up, no account, no usage limits.
Is my data safe?
All escaping and unescaping happens locally in your browser using JavaScript. Nothing is uploaded to any server. It's safe to use with sensitive or proprietary data.
When do I need to escape JSON strings?
You need JSON escaping whenever you embed user-generated text, file contents, or multi-line strings inside a JSON value. Without proper escaping, characters like quotes and newlines will break the JSON syntax and cause parse errors.