← All Tools

String Escaper🔒 100% local

Escape/unescape strings for JavaScript, HTML, URL, Regex, SQL, CSV, Base64, Hex, Shell. All in-browser.

Related Tools

Base ConverterByte Storage ConverterCamel Snake Converter

Shows one piece of text rendered in nine escape formats at once: a JavaScript/JSON string literal, HTML entities, a URL component, a regex literal, a SQL single-quoted literal, a CSV field, Base64, upper-case hex bytes and a POSIX shell single-quoted word. Paste the text once and every row appears together in one output block.

How to use it

  1. Type or paste the text into the input box.
  2. Press Process; the nine labelled rows appear below, each padded so the colons line up.
  3. Find the row for the format you need and copy it out of the block.
  4. Press Clear to empty both boxes and start again.

Worked example

it's <b>becomesJavaScript / JSON : "it's <b>" HTML : it&apos;s &lt;b&gt; URL (encodeURIComponent) : it's%20%3Cb%3E Regex : it's <b> SQL single-quoted : it''s <b> CSV : it's <b> Base64 : aXQncyA8Yj4= Hex (UTF-8 bytes) : 69742773203C623E Shell (single-quoted) : 'it'\''s <b>'

The HTML row escapes the apostrophe and both angle brackets, while the URL row percent-encodes them and the Shell row uses the POSIX quote-out form.

'a,b'becomesCSV : "a,b"

Only the CSV row shown. A value containing a comma is wrapped in double quotes; an input without a quote, comma or newline is emitted bare.

When to use it

What it does not do