Skip to content
§
§ · 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 optionalHe said "hi" → He said \"hi\"
JavaScriptquote char, \, newlines; template mode also ` and ${it's → it\'s
HTML& < >, optionally " ' and non-ASCIIa<b → a&lt;b
URLreserved & unsafe chars → percent-encodinga b → a%20b
Base64everything → A, Z a, z 0, 9 + / (UTF-8 safe)hi → aGk=
SQLsingle quote doubled (''); MySQL mode uses backslashesit's → it''s
CSVfield quoted if it holds delimiter / quote / newline; " doubleda,b → "a,b"
Regex. * + ? ^ $ ( ) [ ] { } | \ optionally - /1+1 → 1\+1
Unicodechars → \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.

  1. Pick a format , JSON, JavaScript, HTML, URL, Base64, SQL, CSV, Regex or Unicode.
  2. Choose a direction: Escape → to encode, or ← Unescape to decode.
  3. Paste or type into the input box , the result appears instantly on the right.
  4. 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 .

Online now

Hi there. How can we help you today?

Reply