§
§ · free tool
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 | é → é |
§ 02 · what you can do
One tool, every escape.
Escape & unescape both waysEvery format runs in reverse too , flip a switch to decode JSON, HTML, URL, Base64 and the rest.
JSON & JavaScript stringsOptional surrounding quotes, single / double / template literals, and non-ASCII to
\uXXXX.HTML entities & URL encodingEncode quotes and numeric entities, or percent-encode with
encodeURIComponent / encodeURI.Base64, SQL & CSVUTF-8-safe Base64 (URL-safe + MIME wrap), standard or MySQL SQL escaping, RFC-style CSV quoting.
Regex & UnicodeEscape every regex metacharacter, or convert to
\uXXXX / \u{…} code-point escapes.Copy, download, swapOne-click copy, download the result as
.txt, or swap input and output to chain conversions.§ 03 · how to use it
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.
§ 04 · faq
Frequently asked questions.
Is the String Escaper free?
Yes , completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my text uploaded anywhere?
No upload, ever. Every conversion runs entirely in your browser on your own device , your text never leaves your computer and nothing is sent to a server.
Does it work offline?
Yes , once the page has loaded, every format keeps working without a connection because all the escaping logic runs locally in JavaScript.
Which formats does it support?
Nine: JSON, JavaScript, HTML entities, URL percent-encoding, Base64, SQL, CSV, regular-expression patterns and Unicode escapes. Each one escapes and unescapes.
What is the difference between JSON and JavaScript escaping?
JSON always uses double quotes and a fixed escape set. JavaScript mode lets you choose single, double or template-literal quotes , template mode also escapes the backtick and
${ interpolation marker.Does Base64 handle emoji and non-English text?
Yes , the Base64 encoder is UTF-8 aware, so emoji and any non-ASCII characters round-trip correctly. You can also switch to the URL-safe variant or wrap lines at 76 characters for MIME.
Published · Last updated .