Escape and unescape strings for JSON, JavaScript, HTML entities, SQL, and C-style backslash sequences. Switch direction and format and watch the result update live — all processed locally in your browser.
How to use String Escape / Unescape
Pick a format: JSON, JavaScript, HTML, SQL, or Backslash.
Choose Escape or Unescape.
Paste your string on the left and copy the converted result on the right.
Frequently asked questions
Which formats are supported?
JSON (string escaping), JavaScript (quotes, backticks, control chars), HTML entities (named and numeric), SQL (single-quote doubling), and C-style backslash escapes including \\xNN and \\uNNNN.
Why does unescaping sometimes show an error?
If the input contains an invalid escape sequence — for example a dangling backslash or a malformed \\u code — the parser reports it instead of producing a wrong result.