Developer Tools
String Escape / Unescape
Escape or unescape strings for JSON, HTML, URLs and JS quotes.
Powering up the tool…
What this tool does
About the string escape / unescape
Four flavours, both directions, correct edge behaviour.
How to use it
- Pick flavour and direction.
- Paste the text.
- Copy the result.
- Escaping is context-specific — always pick the destination’s flavour.
Useful for
- Embed arbitrary text safely in JSON or JS.
- Decode a percent-encoded blob from a URL.
- Neutralise HTML before display.
Straight answers
String Escape / Unescape FAQ
Why are there different escapings at all?
Each context has different dangerous characters: quotes break JSON strings, angle brackets break HTML, ampersands break URLs. Escaping is context-armour — using the wrong flavour is how injection bugs are born.
Is escaping the same as sanitising?
No: escaping makes text inert IN a context; sanitising REMOVES dangerous content. Displaying user input wants escaping at output time — this tool is that operation, portable.