String Escaper
Escape and unescape strings for JSON, JavaScript, HTML, URL, Base64, SQL, CSV, regex and unicode — all on your device, in both directions.
🔒 Your text never leaves your browser. Nothing is uploaded.
What each mode escapes
| Mode | Escapes | Example |
|---|---|---|
| JSON | " \ and control chars (\n, \t, …); non-ASCII optional | He said "hi" → He said \"hi\" |
| JavaScript | quote char, \, newlines; template mode also ` and ${ | it's → it\'s |
| HTML | & < >, optionally " ' and non-ASCII | a<b → a<b |
| URL | reserved & unsafe chars → percent-encoding | a b → a%20b |
| Base64 | everything → A–Z a–z 0–9 + / (UTF-8 safe) | hi → aGk= |
| SQL | single quote doubled (''); MySQL mode uses backslashes | it's → it''s |
| CSV | field quoted if it holds delimiter / quote / newline; " doubled | a,b → "a,b" |
| Regex | . * + ? ^ $ ( ) [ ] { } | \ optionally - / | 1+1 → 1\+1 |
| Unicode | chars → \uXXXX or \u{…} escapes | é → é |