Skip to content
Convertto

String Escaper & Unescaper

Escape strings for JSON, JavaScript, CSV, SQL, XML or shell — and unescape them again.

To escape a string, paste it above and choose the target format. The tool handles JSON and JavaScript string literals, CSV fields, SQL single-quoted values, XML and HTML entities, POSIX shell quoting and regular-expression metacharacters, and can unescape JSON back to plain text.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Why does escaping differ between languages?

Because each defines its own set of characters that need protecting. JSON escapes quotes, backslashes and control characters; SQL doubles single quotes; a shell needs to protect spaces, dollars and backticks. Applying the wrong one leaves an injection open.

Is escaping enough to prevent injection?

It is the last resort, not the first. Parameterised queries in SQL and proper templating in HTML remove the problem structurally. Manual escaping is correct only where no parameterised interface exists.

How to use the string escaper & unescaper

  1. 1Enter or paste your text.
  2. 2Choose the format.
  3. 3The result appears immediately — copy or download it.

Embed this tool

Put the working string escaper & unescaper on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More text tools