Stop Broken API Prompts & Log Strings Caused by Unescaped Quotes

Embedding a multi-line LLM prompt, SQL snippet, or Windows file path inside a JSON payload breaks parsing immediately if a single double-quote ("), newline, or backslash (\) is left unescaped. Clicking Escape → serializes your text cleanly with native JSON.stringify(), while ← Unescape restores escaped log lines back into readable multi-line text—strictly inside local browser memory. Also see JSON to YAML and Unicode Inspector.

Common Characters Escaped Automatically

Standard JSON escaping converts line breaks to \n, tabs to \t, double quotes to \", and backslashes to \\—eliminating syntax errors when pasting LLM system prompts, curl bodies, or config templates into JSON files.

Common JSON String Escape Sequences Quick Reference

CharacterEscaped in JSONTypical Bug Prevented
Double quote "\"Prematurely closing a JSON string value
Backslash \\\Broken Windows file paths and regex patterns
Line break / Tab\n / \tRFC 8259 forbids raw unescaped newlines inside JSON strings

Need to validate or re-indent the full JSON object afterward? Open JSON Formatter & Validator or inspect invisible control bytes in Unicode Inspector.

Frequently Asked Questions

Why does a raw multi-line string fail JSON.parse()?
RFC 8259 disallows literal unescaped control characters (U+0000 to U+001F), including raw line breaks, inside JSON string literals—they must be escaped as \n.
How do I turn an escaped JSON log string back into readable multi-line text?
Paste the escaped string into the Unescape mode above to restore clean quotes, tabs, and line breaks immediately.
Are API payloads or prompt templates uploaded to any server?
No. All escaping and unescaping run 100% locally in your browser.