Jsonic's JSON Escape tool converts raw text into a JSON-safe escaped string, and the Unescape direction reverses it. Escape replaces characters that are not allowed inside JSON string values — newlines become \n, tabs become \t, double quotes become \", backslashes become \\, and control characters become \uXXXX sequences. Unescape reads those sequences and produces the original text. All processing happens in your browser.
How to escape a string for JSON
- Paste your raw text into the input panel.
- Click Escape → to produce a JSON-safe escaped string.
- Copy the output and use it as a JSON string value.
- To reverse: paste the escaped string and click ← Unescape.
FAQ
What characters does JSON escape handle?
The escaper handles: double quotes ("), backslashes (\), newlines (\n), carriage returns (\r), tabs (\t), backspace (\b), form feed (\f), and control characters as \uXXXX Unicode sequences.
When do I need to escape a string for JSON?
When you want to embed a multi-line string, a string containing quotes, or any string with special characters as a value inside a JSON document.
What is the difference between escape and unescape?
Escape converts raw text with actual newlines and quotes into a JSON-safe string with \n and \" sequences. Unescape does the reverse — it converts \n back to a real newline, \" back to a real double quote, etc.
Does escaping wrap the output in quotes?
No. The output is the escaped content only, without surrounding quotes. Add your own quotes when embedding it in a JSON document.
Is the output valid inside a JSON string value?
Yes. The escaped output can be safely placed between double quotes in any JSON document.
Is my data sent to a server?
No. All processing runs in your browser. Your text never leaves your device.