JSON Escape / Unescape
- Backspace is replaced with \b
- Form feed is replaced with \f
- Newline is replaced with \n
- Carriage return is replaced with \r
- Tab is replaced with \t
- Double quote is replaced with \"
- Backslash is replaced with \\
Part of JSON tools
About JSON Escape / Unescape
JSON escaping turns raw text into a safe string value for JSON documents—quotes become \\", newlines become \\n, and backslashes are doubled. Unescaping reverses that when you copy a string literal out of a log file or API response.
How to Use JSON Escape / Unescape
Paste plain text and escape to embed it inside a JSON property. Or paste an escaped JSON string fragment to recover readable text. Copy the result into Postman bodies, config files, or unit tests.
When to Use JSON Escape / Unescape
API development: Build request bodies with user-supplied text safely. Logging: Decode escaped payloads from error messages. Config edits: Fix broken JSON caused by unescaped quotes. Teaching: Show why raw newlines break JSON.parse.
Why Use This JSON Escape / Unescape?
Hand-escaping quotes is tedious and error-prone. One click produces a string JavaScript and JSON.parse accept.
How to use
1. Paste plain text and escape to embed it inside a JSON property.
2. Or paste an escaped JSON string fragment to recover readable text.
3. Copy the result into Postman bodies, config files, or unit tests.
Frequently asked questions
Escape vs JSON.stringify?
JSON.stringify wraps and quotes the whole value. This tool focuses on the string contents inside quotes.
Does it validate full JSON documents?
Use the JSON Formatter for whole objects. This page is for string fragments.