JSON String Escaper and Unescaper
Escapes text for embedding inside a JSON string, and unescapes a JSON string back to plain text.
Loading the tool…
Processing happens locally in your browser.
What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.
How to use this tool
- Paste plain text to escape it, or a JSON-escaped string to decode it.
- Select Escape or Unescape.
- Copy the result into the document or the log viewer you are working with.
What json string escaper does
Putting one document inside another is where escaping bugs live. A SQL statement, an HTML fragment or a stack trace embedded in a JSON string field needs its quotes, backslashes, newlines and control characters escaped, and doing it by hand almost always misses one.
The reverse direction is just as common: a log line contains a JSON-escaped payload that is unreadable until the escaping is undone. Unescape it here and the newlines and quotes come back, which usually makes the actual error visible immediately.
Frequently asked questions
Double quotes, backslashes, newlines, carriage returns, tabs, form feeds, backspaces and any remaining control characters, which are written as Unicode escapes. That is the full set the JSON grammar requires.
The escaped output is the string body, ready to paste between quotes in your document. Nothing is added around it, so it also works when you are building a value programmatically.
Yes — that is what Unescape is for. Paste the escaped fragment and the newlines, tabs and quotes are restored, which usually makes the underlying error readable immediately.