How to use the JSON String Unescape
Decode a JSON-escaped string in two steps:
1
Paste the JSON-escaped string
Paste the escaped string with or without surrounding double quotes. If you paste the complete "escaped value" including quotes, the tool strips them automatically before decoding.
2
Read the decoded output
All JSON escape sequences are decoded to their actual characters. The tool uses native JSON.parse() for maximum accuracy with a manual fallback.
When to use this tool
Use this tool to decode JSON escape sequences back to readable text:
- →Decoding JSON-escaped strings from API responses where values appear with \n and \t sequences instead of actual formatting
- →Reading log output that contains JSON-serialized strings with escaped characters that are hard to read
- →Inspecting database fields that store JSON-encoded text to see the actual content with proper line breaks
- →Debugging JSON payloads where string values have been double-escaped and need a decoding pass
- →Converting JSON-escaped configuration values back to human-readable format for editing
- →Verifying JSON string escaping round-trips by decoding escaped output back to the original input
Frequently asked questions
Q:Can I paste the complete JSON string value including its surrounding quotes?
Yes — the tool automatically detects and strips surrounding double quotes before decoding. If you paste "Hello\nWorld" (with the quotes), it correctly decodes to the two-line string Hello/World. If you paste just Hello\nWorld (without quotes), it produces the same result. This makes it easy to copy a string value directly from a JSON document or JSON viewer and paste it here without manually removing the surrounding quotes.
Q:What is the difference between decoding a JSON string and parsing JSON?
Decoding a JSON string converts the escape sequences within a string value back to their literal characters — this operates on the contents of a single string. Parsing JSON processes an entire JSON document to produce a data structure (object, array, etc.). This tool does string-level decoding, not full JSON document parsing. For parsing a complete JSON document, use browser DevTools, a JSON formatter tool, or your programming language's JSON.parse() function. Use this tool when you have a specific string value (not a whole JSON document) that you want to read with its escape sequences expanded.
Q:Why does my API response show \n instead of actual newlines?
This happens when a JSON string value contains actual newline characters that were escaped to \n during JSON serialization — which is correct behavior per the JSON spec. When you view the raw HTTP response body as text, you see the escaped form \n (two characters: backslash and 'n'). When your application code calls JSON.parse() or a JSON decoder, the \n is converted to an actual newline character in memory. If you're reading raw API responses in a tool that shows the JSON text directly, use this unescape tool to see what the decoded string actually contains.
Q:What if my string has been JSON-escaped twice?
Double-escaped strings occur when JSON-serialized content is stored inside another JSON string — for example, a JSON API response that contains a JSON document as a string value. In this case \n becomes \\n, and " becomes \\". Run the decoder twice: the first pass removes one layer of escaping, and the second reveals the underlying content. Each decoding pass removes exactly one layer of JSON string escaping. The tool shows the decoded output as a string, so you can paste it back in for a second decode if needed.
Q:How does this tool handle \uHHHH Unicode sequences in JSON?
\uHHHH sequences in JSON are decoded to their corresponding Unicode characters. For example, \u00E9 becomes é, \u4E16 becomes 世, and \u2665 becomes ♥. Surrogate pair sequences (two \uHHHH sequences representing a single supplementary Unicode character above U+FFFF) are handled by the underlying JSON.parse() call, which correctly reconstructs the supplementary character. The manual fallback uses String.fromCharCode() for each \uHHHH group and correctly handles BMP characters, though for surrogate pairs the JSON.parse() path is preferred.
Q:Can this tool decode JSON that contains escaped forward slashes?
Yes — some JSON serializers (notably PHP's json_encode() without JSON_UNESCAPED_SLASHES, and some older JavaScript environments) escape forward slashes as \/ even though this is optional per RFC 8259. This tool's JSON.parse() based decoding correctly handles \/ and converts it to /. This is important when decoding URL values in JSON fields that may appear as https:\/\/example.com — the \/ is decoded back to / producing the correct URL https://example.com.