Paste your JSON here, or drag a file…
Drag & drop a file, or paste content above
Output will appear here
About
The JSON Escape / Unescape tool handles the full set of escape sequences defined by the JSON specification: double quotes become \", backslashes become \\, newlines become \n, carriage returns become \r, horizontal tabs become \t, and non-printable Unicode control characters become \uXXXX sequences. This is essential when embedding arbitrary text inside a JSON string value — raw special characters break JSON parsers. The Unescape direction converts all of those sequences back to their literal characters, making double-encoded JSON readable again. Everything runs in your browser; nothing is transmitted to any server.
How to use
- 1 Paste your raw text (the content you want to embed as a JSON string value) into the input field.
- 2 The Escape mode is active by default — the escaped output appears immediately on the right.
- 3 Switch to Unescape mode to convert an already-escaped JSON string back to its literal form.
- 4 Copy the result with the Copy button and paste it directly into your JSON string value (between the quotes).
- Why do I need to escape strings before putting them in JSON?
- JSON string values cannot contain raw double quotes, backslashes, or control characters such as newlines and tabs. These must be written as escape sequences (\", \\, \n, \t). If you paste raw text containing these characters directly into a JSON string, the parser will fail with a syntax error. This tool handles the escaping for you in one click.
- What exactly does this tool escape?
- The tool escapes all characters required by the JSON specification: double quotes (→ \"), backslashes (→ \\), newlines (→ \n), carriage returns (→ \r), horizontal tabs (→ \t), and Unicode control characters in the range U+0000–U+001F (→ \uXXXX). Unescape reverses every one of these sequences back to its literal character.
- When would I use JSON unescape?
- Unescape is useful when you receive JSON that has been double-encoded — for example, a JSON payload stored as a string inside another JSON object, log output that printed the raw escaped representation of a JSON value, or a database column that contains a serialised JSON string. Running it through Unescape gives you the human-readable original text.
- Does this tool wrap the result in quotes to make a complete JSON string?
- No — the tool only escapes or unescapes the content of the string, not the surrounding quotes. You add the enclosing double quotes yourself when you paste the result into your JSON document. This keeps the tool flexible for any context.
- Is my data sent anywhere?
- No. Escaping and unescaping run entirely in your browser. Your text is never transmitted to any server, which makes it safe to use with log data, credentials, or any text that might contain sensitive information.