JSON Escape / Unescape
Paste plain text to escape it for a JSON string, or paste escaped JSON string content to decode sequences such as \n, \t, \", \\, and \uXXXX.
Options
What is a JSON Escape / Unescape tool?
A JSON Escape / Unescape tool converts plain text into JSON-safe string content and decodes escaped JSON string sequences back into readable text.
It is useful when building API payloads, debugging logs, embedding strings in JSON config, or checking how quotes, backslashes, newlines, tabs, and Unicode escapes are represented.
How to use the JSON Escape / Unescape tool
- Paste plain text into the input field and click Escape to create JSON-safe string content.
- Enable surrounding quotes if you need a complete JSON string literal.
- Paste escaped JSON content and click Unescape to decode sequences such as \n, \t, \", and \uXXXX.
- Use Quote string when you want the output as a valid quoted JSON string.
Tips
- JSON strings must escape double quotes and backslashes.
- Newlines are represented as \n inside JSON strings.
- Use the quoted output when copying a value directly into a JSON document.
- Everything runs locally in your browser.
Related tools
You may also find these tools useful.
JSON Formatter
Format and minify JSON instantly.
Data & Format
›
JSONPath Tester
Run JSONPath expressions against JSON and inspect matching values and paths.
Data & Format
›
JSON Diff Tool
Compare two JSON objects instantly in your browser.
Data & Format
›
JSON ↔ YAML Converter
Convert JSON to YAML and YAML to JSON instantly.
Data & Format
›
URL Encoder
Encode URL strings online
Encoding & Security
›
JSON Escape / Unescape FAQ
What characters does JSON escaping handle?
It handles JSON string escaping for quotes, backslashes, control characters such as newlines and tabs, and Unicode escape sequences.
Should escaped JSON include quotes?
Use quotes when you need a complete JSON string value. Leave quotes off when you only need the escaped inner string content.
Can it decode \uXXXX sequences?
Yes. Unescape uses the browser JSON parser, so Unicode escape sequences are decoded as JSON strings.
Is my text uploaded?
No. Escaping and unescaping run in your browser.