Skip to content
🔐

Text Escape and Unescape

Escape or unescape text for JSON, SQL, shell, URL, HTML, and XML.

Result

Input length

0

Output length

0

Characters changed

0

Characters handled

MeaningEscapeIn the output
Escaping is for building a correct value, not for safety on its own. Never build SQL by escaping quotes alone, use a parameterised query. Treat any HTML output as a place you can still inject markup unless you sanitise it deliberately.

What Is Text Escape and Unescape?

The Text Escape and Unescape tool converts text for a specific context, so a value built for JSON does not end up quoted for SQL. It handles JSON, SQL single quotes, shell, URL encoding, HTML, XML, and regular expressions, in both directions.

Who Uses the Text Escape and Unescape?

Developers use it when a string will not parse and they need to see which characters are wrong, when a value has to go into a JSON payload or a shell command, and when unescaping a log or a config file that shows backslash sequences. Support staff use it to read escaped text from a ticket.

How to Use the Text Escape and Unescape

  1. Choose the context you need.
  2. Paste the text in, then switch between Escape and Unescape.
  3. Copy the result straight into your code.

Why Choose Our Text Escape and Unescape?

  • Seven contexts, each with its own rules
  • Escape and unescape in the same place
  • Shows which characters changed

Try the Text Escape and Unescape above — it is free, fast, and works on any device. Bookmark this page to return whenever you need it.