String Escape / Unescape
Escape text for HTML, XML, JSON, JavaScript, URLs, CSV cells, SQL and regexes, and unescape it back. Double escaping gets flagged. Everything stays in your browser.
Result
Notes
Escaping turns special characters into a safe form: in HTML the less-than sign becomes <, in JSON a line break becomes \n, in a URL Cyrillic text becomes %D0%BA. Unescaping reverses the change. Pick the mode by where the text is going: markup, code, a URL, a table.
After every conversion the result is unescaped back and compared with the original character by character. If anything does not match, the page says so directly.
Modes
- HTML: five special characters; unescaping understands all named entities, including
and—; - XML: only the five entities, no
; - JSON and JavaScript: string literal contents, quotes optional, non-ASCII optional as
\u0430; - CSV cell: quotes added when the text contains a delimiter, a quote, or a line break; a quote inside is doubled;
- SQL string: the apostrophe is doubled. This is not a replacement for query parameters: avoid putting values into query text at all;
- regular expression: dots, brackets, asterisks and other special characters get a backslash.
Your text stays in the browser
People escape tokens, passwords, and fragments of other people's emails. Nothing goes to a server: conversion and comparison run on your side.
Rate this tool
Help us get better
Tell us what was missing.
Other tools
JSON Formatter
Format and repair JSON in the browser, flagging duplicate keys and long numbers
Regex Tester
Regex testing with a plain-language breakdown and hang protection
JWT Decoder
JWT parsing with fields explained and signature verification
CSV to JSON
A table to JSON with honest types and a reverse check
JSON to CSV
JSON to a table for Excel, with verification and formula protection
SQL Formatter
A readable query layout, verified against the source, with risky spots flagged
XML Formatter
Readable XML, errors explained with a hint, verified against the source
XML Validator
Markup, XSD schema, sitemap, YML and RSS rules, with the path to each error