JSON Escape and Unescape Tool
Escape text for a JSON string value, or decode JSON string escapes back to plain text.
What it does
JSON strings use backslash escapes for double quotes, backslashes, control characters, tabs, and newlines. Escaping text makes it safe to place inside a JSON string value.
Unescaping parses JSON string escape sequences back into plain text. It accepts either raw escaped string content or a complete quoted JSON string.
Common uses
- Escape a message, file path, snippet, or multiline value before embedding it in a JSON string field.
- Decode copied JSON string values from logs, API responses, config files, or error messages.
- Use the JSON formatter when you need to validate or pretty-print a full JSON object or array.
Watch outs
- This tool escapes JSON string content, not a complete JSON object.
- Unescape mode rejects malformed sequences such as a lone backslash or invalid Unicode escape.
- Forward slashes usually do not need escaping in JSON, so this tool leaves them readable.
Privacy
JSON string escaping and unescaping runs in your browser. The pasted text is not uploaded.
FAQ
Does the escaped output include surrounding quotes?
No. It returns the escaped string content so you can paste it inside an existing JSON string. Unescape mode also accepts a complete quoted JSON string.
Can I format a full JSON object here?
Use the JSON formatter for full objects and arrays. This page is focused on JSON string escaping.
Why did unescape mode show an error?
The input must be valid JSON string content, so backslashes need valid escape letters or Unicode escape sequences.
Related tools
JSON Formatter
Client-side JSON formatter with a tree viewer, highlighted formatted text, line-delimited JSON support, one-click copy, and file export.
HTML Escape
Client-side HTML escape and unescape tool for ampersands, angle brackets, quotes, apostrophes, numeric entities, and common named entities.
SQL Escape
Client-side SQL string escape and unescape tool for ANSI single-quoted string literal content using doubled apostrophes.