Escape text for HTML, or turn entities back into readable characters.
Only & < > " and ' are escaped — accents and emoji stay readable
Escape a snippet
Show markup as text
<a href="x">Tom & Jerry</a>Decode entities
Turn escapes back into characters
<p>Café & crème</p>Double-encoded text
Decodes one level at a time
&lt;strong&gt;Escape a snippet
Show markup as text
<a href="x">Tom & Jerry</a>Decode entities
Turn escapes back into characters
<p>Café & crème</p>Double-encoded text
Decodes one level at a time
&lt;strong&gt;Encode to escape text, decode to turn entities back into characters.
The result appears as you type.
If a decoded result still contains entities, it was encoded more than once.
All 2,231 WHATWG named references, not the handful most tools ship. Every one is verified against a separate reference implementation, so ♥, fj and ∳ all decode correctly.
Only & < > " and ' are escaped. Accented letters, emoji and symbols are valid UTF-8 in an HTML document and stay readable, rather than being turned into escape sequences that bloat the markup for no benefit.
Decoding &lt; gives you < and stops. Unknown entities are returned untouched. A decoder that recursed or dropped what it did not recognise would quietly corrupt text.
Paste text to escape the five characters that carry meaning in HTML, or paste encoded text to turn entities back into what they represent. The decoder handles the complete WHATWG named-entity set — all 2,231 of them — as well as decimal and hexadecimal numeric references and the legacy forms that have no semicolon. Encoding touches only the characters that need it, so accents, emoji and other UTF-8 stay readable rather than becoming a wall of escape sequences. Decoding goes exactly one level, so text that was encoded twice is not silently unwrapped past what you asked for. Everything runs in your browser.
Keep going
Related pages in Developer Tools, plus what others are using right now.
More developer tools that pair well with this one.
Percent-encode and decode URLs, with the component and full-URL modes kept apart.
Encode text to Base64, including full Unicode and URL-safe output.
Decode Base64 back to readable text, with clear errors when it is not valid.
Indent messy HTML into readable, consistently structured markup.
Format, validate and minify JSON, with errors that point to the exact line.
Test regular expressions live, with highlighted matches and capture groups.
Create strong random passwords with full control over length and characters.
Work out any percentage — of a number, as a share, or as a change.
Count words, characters, sentences and paragraphs as you type.
Convert between length, weight, temperature, volume, speed, data and more.
Count characters with and without spaces, against the limits that matter.
Find the mean, median, mode and range of a list of numbers, with the working shown.
Sample and population standard deviation and variance, both shown, with the working.
Turn a logo into favicon.ico, the PNG sizes a site needs, and the HTML to declare them.
Check a downloaded file against its published checksum, without uploading anything.
Stamp text like DRAFT or CONFIDENTIAL across a PDF, in your browser.
See how savings grow with compounding, including regular contributions.
Shrink JPEG, PNG and WebP files with a quality slider and a live size comparison.