Text Escape / Unescape

Escape or unescape strings for JavaScript, HTML, URL encoding, and JSON.

Escaping and Unescaping Notes

Escaping protects literal text when inserted into formats like JSON, HTML, or shell commands where special characters have meaning.

Related tools: HTML Encoder, URL Encoder, Regex Tester.

Text Escape FAQ

What causes double-escaped output?

Running escape repeatedly on already escaped text adds extra escape characters.

When should I unescape data?

Unescape when you need readable text for debugging or display in plain contexts.

Is escaping the same as sanitizing?

No. Escaping is format-specific encoding, while sanitizing removes unsafe content.