What does this tool do?
JSON Escape turns any text into a form that can be safely embedded inside a JSON string, converting characters like double quotes, backslashes, newlines, and tabs into the escape sequences \" , \\ , \n , and \t. The Unescape mode reverses the process. It runs instantly in your browser and is useful for anyone building API payloads, config files, or log lines.
How to use it
- Paste or type your data into the left field.
- The result is generated instantly on the right.
- Use the Copy button to grab the output.
Exactly what it does
Escape mode takes your text and produces the escaped string JSON expects, so Hello "World" becomes Hello \"World\", newlines become \n, tabs become \t, and backslashes become \\. Note that the output has no surrounding quotes, which means you can paste the result directly inside an existing JSON string. Unescape mode does the opposite, decoding an escaped string back into its real characters.
Common use cases
Use it when you need to embed a multi-line SQL query or an HTML fragment into a JSON config field, when hand-crafting an API request body, or when writing an error message into a JSON log. Escaping text that contains quotes and line breaks by hand is error-prone; this tool does it instantly and correctly, and you copy the result with one click.
Frequently asked questions
Why are there no quotes at the start and end of the output?
Because the result is the contents of a JSON string, not the string itself. This lets you paste the output directly inside an existing "..." expression. If you want a complete JSON value, wrap the result in your own double quotes.
Does it convert Unicode characters to \u form?
No, standard JSON escaping is used, so UTF-8 characters such as accented letters or emoji are preserved as-is. Only control characters and special characters (like ", \, \n, \t) are escaped.
What does it mean if I get an error while unescaping?
One of the escape sequences in your input may be invalid, such as a lone backslash or an incomplete \u sequence. When the decoder cannot form a valid JSON string, it shows the error in the output area.
Is JSON Escape / Unescape free?
Yes. JSON Escape / Unescape and all 300+ tools on MagmaNex are completely free with no signup or account required.
Is my data safe?
Yes. Everything runs locally in your browser. The data you enter is never sent to a server, stored, or shared.
Does it work on mobile?
Yes. JSON Escape / Unescape works on phones, tablets and desktops — no app download needed.
🔒 Privacy: everything runs in your browser, your data is never sent to a server.
