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
| Character | Escape Sequence | Description |
|---|---|---|
| " | \" | Double quote |
| \ | \\ | Backslash |
| / | \/ | Forward slash (optional) |
| newline | \n | Line feed (LF) |
| carriage return | \r | Carriage return (CR) |
| tab | \t | Horizontal tab |
| backspace | \b | Backspace |
| form feed | \f | Form feed |
| Unicode | \uXXXX | Unicode 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