JSON Escape / Unescape

Escape special characters in JSON strings, or unescape encoded JSON back to readable text. Handles quotes, backslashes, newlines, tabs, and all standard JSON escape sequences.

Mode:

JSON Escape Sequences Reference

CharacterEscape SequenceDescription
"\"Double quote
\\\Backslash
/\/Forward slash (optional)
newline\nLine feed (LF)
carriage return\rCarriage return (CR)
tab\tHorizontal tab
backspace\bBackspace
form feed\fForm feed
Unicode\uXXXXUnicode code point (4 hex digits)

When to use Escape

  • • Embedding JSON inside another JSON string value
  • • Storing JSON in a database text field
  • • Passing JSON as a URL parameter
  • • Writing JSON in configuration strings
  • • Embedding JSON in shell scripts or HTML attributes

When to use Unescape

  • • Decoding a JSON string received from an API
  • • Reading escaped JSON stored in a database
  • • Debugging minified or encoded JSON data
  • • Reverting escaped strings to readable format
  • • Converting \\n → actual newlines for display