JSONHack
Validator · Formatter · Base64
String Tool

JSON Escape / Unescape

Escape special characters in a plain text string so it can be safely embedded inside a JSON value. Or unescape a JSON-encoded string back to its original readable form. All processing happens locally in your browser.

Input
Paste plain text to escape, or a JSON-escaped string to unescape
Output

JSON Escape Characters Reference

CharacterEscapedDescription
"\"Double quote — must be escaped inside JSON strings
\\\Backslash — must be escaped to avoid ambiguity
newline\nLine feed / new line character
tab\tHorizontal tab character
carriage return\rCarriage return character
/\/Forward slash (optional but valid)
backspace\bBackspace character
form feed\fForm feed character

When Do You Need to Escape JSON?

Escape vs Encode — What's the Difference?

JSON escaping adds backslash sequences for special characters within a string value. It is different from URL encoding (which uses % sequences) and Base64 encoding (which converts binary to ASCII). Use JSON escaping when you need to embed a string safely inside a JSON document. Use URL encoding for query parameters, and Base64 for binary data.

Need to validate the full JSON?

Use the JSON validator to check the complete document.

Open JSON Validator →