String escaper. Both ways, nine formats.
Escape and unescape strings for JSON, JavaScript, HTML, URL, Base64, SQL, CSV, regex and Unicode. Every conversion runs on your device, no upload, no sign-up.
A free online tool by Digital Heroes🔒 Your text never leaves your browser. Nothing is uploaded.
What each format escapes
| Format | 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 | é → é |
One tool, every escape.
\uXXXX.encodeURIComponent / encodeURI.\uXXXX / \u{…} code-point escapes..txt, or swap input and output to chain conversions.Four steps, no install.
- Pick a format , JSON, JavaScript, HTML, URL, Base64, SQL, CSV, Regex or Unicode.
- Choose a direction: Escape → to encode, or ← Unescape to decode.
- Paste or type into the input box , the result appears instantly on the right.
- Tune any per-format options, then Copy or Download the output.
Frequently asked questions.
Is the String Escaper free?
Is it private? Is my text uploaded anywhere?
Does it work offline?
Which formats does it support?
What is the difference between JSON and JavaScript escaping?
${ interpolation marker.Does Base64 handle emoji and non-English text?
Published · Last updated .