Whenever you paste text into a JSON string literal you have to escape any double quote, backslash, newline, tab, or control character, otherwise the parser rejects it. This tool takes raw input and returns a JSON-safe version with the correct backslash sequences, which you can then drop between quotes inside your payload. Handy when embedding HTML, regex patterns, or multi-line log excerpts.
Convert a chunk of HTML with double quotes into an escaped string you can assign to a JSON field without breaking the structure.
Newlines and tabs from a stack trace become \n and \t so the whole trace fits on one JSON line.
Quickly turn a paragraph of prose into a valid JSON string literal for a unit test or API contract example.
Backslashes in a regex double up correctly so the JSON parser and the regex engine each see what they expect.
Double quote, backslash, and the control characters from U+0000 to U+001F. Forward slash is optional and usually left as is.
It only escapes the content. Add the enclosing double quotes yourself when you paste the result into your JSON.
Unicode characters above the ASCII range are left as literal UTF-8 by default. Use the Unicode encoder if you specifically need \u escapes.
Yes, use the JSON unescape tool to turn an escaped string back into its original text.