What is JSON String Escape & Unescape?
JSON String Escape converts between ordinary text and the contents of a JSON string. It is useful for quotes, backslashes, newlines, control characters, and Unicode text. The tool handles only the string body, never evaluates code, and does not treat input as a complete JSON document. Common workflows include the following. Embed multiline text in a JSON field or code example. Read escaped sequences found in logs. Build test strings containing quotes and control characters. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Embed multiline text in a JSON field or code example.
- Read escaped sequences found in logs.
- Build test strings containing quotes and control characters.
How to use it
- Enter string content without outer JSON quotes.
- Choose escape or unescape.
- Copy the converted text.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
Line one: JSONLane
Line two: He said "check the \ path".
Line three: tabbed valueExample 2
Path: C:\Projects\JSONLane\jsonlane-web\out
Status: "ready"Input rules
- Do not include the outer JSON quotation marks.
- Unescaping accepts only escapes allowed by JSON.
- A dangling backslash, malformed Unicode escape, or illegal control character is rejected.
- Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- Unescape accepts only valid JSON escape sequences such as \n, \t, \uXXXX, escaped quotes, and backslashes.
Output rules
- Escaped output is string content and does not add outer quotation marks.
- Unescaping restores newlines, tabs, quotes, backslashes, and Unicode escapes.
- Chinese text and emoji remain valid Unicode.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- The result is string content, not a complete JSON document.
Limitations and cautions
- Unescape accepts only valid JSON escape sequences such as \n, \t, \uXXXX, escaped quotes, and backslashes.
- The result is string content, not a complete JSON document.
How your data is handled
Character scanning and conversion run locally without eval, uploads, or saved input.