Escapes raw text for embedding inside a JSON string value — replacing backslashes, double quotes, newlines, tabs, and control characters with their \n, \t, \" equivalents. Also unescapes JSON string content back to raw text. Useful when building JSON manually, inserting code snippets into API payloads, or debugging JSON parse errors.
Paste your text to escape it for JSON, or paste a JSON string value to unescape it. For escaping HTML entities instead, use the HTML Encoder/Decoder.
Escape
Input
She said "hello" New line here
Output
She said \"hello\"\nNew line here
Encode special characters to HTML entities and decode them back.
Beautify, minify, and validate JSON with syntax highlighting.
Percent-encode URLs and query strings, or decode them.
Reference for escape sequences in major programming languages.
Compare two blocks of text and highlight the differences.
Test regular expressions against sample text with live match highlighting.