JSON String Escape and Unescape
Escape text for a JSON string, or read an escaped one.
Input
This tool runs entirely in your browser. The data you paste or load is never uploaded.
Result
Enter your input, then run the tool.
About this tool
Escapes quotes, backslashes, line breaks and control characters so text can be pasted inside a JSON or JavaScript string, and turns an escaped string such as "line\nnext" back into readable text. Non-ASCII characters can be kept or written as \u escapes.
How to use it
- Choose escape or unescape.
- Paste the text or the escaped string.
- Copy the result.
Frequently asked questions
Do I need to include the surrounding quotes?
No. When unescaping, quotes around the string are optional; when escaping, enable “Wrap in quotes” to add them.
When should I use \u escapes?
Only for systems that accept ASCII alone. Modern JSON is UTF-8, so accented letters and emoji can stay as they are.
Keep going
Related tools
JSON Formatter
Pretty-print compact or broken JSON with a readable indentation.
URL Encoder
Percent-encode text for URLs and query strings.
HTML Entity Encoder / Decoder
Escape and unescape HTML entities in both directions.
JSON Validator
Check JSON syntax and see exactly where it breaks.
JSON Minifier
Strip whitespace from JSON to shrink payloads.
JSON to CSV Converter
Turn an array of JSON objects into a spreadsheet-ready CSV.