JSON Escape / Unescape
Turn text with double quotes, line breaks or backslashes into a valid JSON string, or read an escaped string back into the original text.
How to escape or unescape JSON
- Pick a direction: "Escape" turns plain text into a JSON string, "Unescape" does the reverse.
- Paste your content on the left and the result appears on the right.
- Use the copy button to grab the result. If the string has a syntax error when unescaping, the tool points at the line and column.
Frequently asked questions
When you want to put text containing double quotes, line breaks or backslashes inside a JSON value — for example to send it to an API or write a config file. Without escaping, the JSON would break.
When you come across a string full of characters like \n or \" (usually JSON that got wrapped more than once), unescape lets you read the real content, for example recovering a whole JSON document stored inside a string.
When unescaping, if the text starts and ends with a double quote, the tool treats it as a complete JSON string and drops those two quotes. If a quote is part of the content, write it as \".
No. Accented letters and emoji are kept as they are. When unescaping, codes like \u1ec7 are still read back as normal letters.
Usually a double quote isn't written as \", a backslash is on its own, or there's a real line break in the middle of the string (a line break must be written as \n). Check the reported line and column.
No. The content is processed right on your device.
It's completely free, no account needed.
Related tools
Base64 & URL Encoder / DecoderEncode and decode Base64 and URLsJSON FormatterFormat, minify and validate JSONJSON RepairAutomatically fix broken JSONJSON CompareFind the differences between two JSON documentsJSON ViewerView JSON as a tree, collapse or expand any branchJSON SorterSort JSON fields and arrays from A to ZJSONPath QueryExtract data from JSON with a JSONPath expressionJSON to YAMLConvert between JSON and YAMLJSON to TOMLConvert between JSON and TOML