HTML Entity & String Escape Tool

Link copied

Encode and decode HTML entities and escape or unescape strings right in your browser. Convert reserved characters like <, >, &, and quotes to HTML entities and back (named and numeric references), or switch to JS string, JSON string, and generic backslash modes to escape and unescape control characters, quotes, and Unicode sequences. Toggle between escape and decode, swap the direction to chain operations, and copy the result in one click. Full UTF-8 support means emoji and non-Latin scripts round-trip cleanly. Free, fast, and runs entirely on your device.

How to use

Pick a transformation type — HTML entities, JS string, JSON string, or backslash sequences — choose Escape or Unescape, then type or paste your text. The result updates instantly; use Swap to flip the direction and feed the output back in, or Copy to grab it.

Frequently asked questions

What is the difference between the JS, JSON, and backslash modes?
All three turn control characters and special characters into backslash escape sequences. JSON mode follows the JSON spec exactly (via JSON.stringify/parse). JS string mode additionally escapes single quotes, double quotes, and backticks for embedding in JavaScript literals. Backslash mode escapes the backslash and control characters but leaves quotes untouched, which suits C-style or .properties-style text.
Which HTML entities does it decode?
Encoding covers the five reserved characters (&, <, >, ", and '). Decoding handles those plus a set of common named entities (such as &copy;, &mdash;, and &euro;) and any numeric reference, both decimal (&#163;) and hexadecimal (&#xA3;). Unknown entities are left unchanged, just like a browser.
Is my text uploaded anywhere?
No. All encoding, decoding, escaping, and unescaping happen locally in your browser — your text never leaves your device.