Output will appear here
Output will appear here
JSON String Escape / Unescape
Escape a string for safe embedding inside a JSON string value, or unescape a JSON-escaped string. Uses the JSON specification rules for control characters, quotes, and backslashes.
Use Cases
- Prepare strings for manual JSON construction in code
- Escape multi-line text for embedding in JSON API payloads
- Debug JSON parsing errors caused by unescaped characters
- Convert readable text to JSON-safe string values
- Unescape JSON strings for human-readable inspection
Frequently Asked Questions
What characters are escaped in JSON?
JSON requires escaping of backslashes (\\), double quotes (\"), and control characters like newline (\n), tab (\t), carriage return (\r), form feed (\f), and backspace (\b).
When would I need to escape a string for JSON?
When building JSON manually, embedding strings in JSON templates, or debugging JSON parsing errors caused by unescaped special characters in string values.