How to use this tool
- Paste raw text when you need a JSON-safe string literal.
- Use Escape JSON string to create a quoted, escaped JSON string.
- Paste escaped output and use Unescape JSON string when you need readable text again.
Escape JSON strings for source code, logs, test fixtures, and API payloads, or unescape quoted JSON text back into readable content. The tool runs in your browser and keeps pasted text local to the page.
Waiting for input.
Sample input/output: input Hello "WebUtilsLab" becomes "Hello \"WebUtilsLab\"". A string with line breaks becomes a single quoted JSON string with \n escape sequences.
Use it when adding JSON to test snapshots, embedding payload examples in code, reading escaped log lines, or preparing small API request examples for documentation.
Format a payload in JSON Formatter, escape a string here, then inspect patterns with Regex Tester or parse callback values in URL Query Parser.
| Input problem | What happens | How to fix |
|---|---|---|
| Unquoted escaped text | Strict JSON parse may fail. | The tool falls back to string-style unescaping when possible. |
| Broken escape sequence | Output would be ambiguous. | Check backslashes before quotes, Unicode escapes, and line endings. |
| Large pasted logs | Output can become hard to scan. | Extract only the string or payload segment you need. |
| Case | Result |
|---|---|
| Quotes and backslashes | Escaped as \" and \\. |
| Tabs and new lines | Escaped as \t and \n. |
| Emoji or non-ASCII text | Kept readable by the browser's JSON encoder. |
No. Escaping and unescaping run locally in your browser page.
No. Escaping prepares a string literal. Use JSON Formatter when you need to format a full object or array.
Yes, if the log contains a valid quoted JSON string or recognizable escape sequences.
Avoid production secrets, customer records, tokens, and credentials in any website unless your environment approves it.