HTML entity encoder and decoder
Escape text so it shows as text inside HTML, or decode named and numeric HTML entities back into readable characters.
Runs in your browser. Your text is never inserted into this page, sent to or stored by EpiFive.
How to use it
- Paste text or HTML into the box.
- To escape it, choose a mode and tap Encode. Only & < > " ' is right for code snippets and attribute values; the other modes also turn accented letters, symbols and emoji into entities.
- To unescape it, tap Decode. Anything that looks like an entity but is not a real one is left as written and listed below the result.
Common HTML entities
&&,<<,>>,"",'' non-breaking space,©©,®®,™™——,……,→→,₹₹ (the rupee sign has no named entity)
Related tools
- URL encode and decode: Percent-encode text for links and query strings, decode %20 URLs, and see every query parameter.
- Base64 encode and decode: Encode or decode Base64 text (UTF-8 safe) and convert files to and from Base64.
- Unicode character inspector: Code points, UTF-8 bytes and escapes for every character, plus zero-width, bidi and lookalike letters.
- Markdown to HTML converter: Markdown to clean HTML with a live preview, GitHub tables and task lists. Copy or download .html.
- Meta tag generator: Title, description, canonical, robots, Open Graph and Twitter tags with a live Google preview.
Questions people ask
Which characters must be escaped in HTML?
Inside text, & and < must be escaped, as & and <. Inside an attribute value, also escape the quote mark that wraps it: " for double quotes or ' for single quotes. Escaping > as > is not required but is common. The default “Only & < > " '” mode does exactly these five.
Do I need entities for accented letters and emoji?
Not on a page saved as UTF-8, which is nearly every modern page: you can type é, ₹ or 😀 directly. Encode them only when the text has to pass through a system that is not UTF-8 safe, such as some old email templates or databases. Then choose a non-ASCII mode.
What is the difference between named and numeric entities?
A named entity such as é or © is easier to read but only exists for some characters. A numeric entity works for every Unicode character: é in decimal or é in hex both mean é. The decoder here understands all three forms, including every named entity in the HTML standard.
Does escaping HTML protect against XSS?
Escaping & < > " and ' when you place untrusted text into HTML text or a quoted attribute is the core defence against cross-site scripting. It is not enough inside a script tag, a style tag, an unquoted attribute or a URL such as href, which need their own encoding or validation. Prefer your framework’s auto-escaping over hand-written escaping.
Why do I see &amp; in my text?
The text was escaped twice: & became &, then the & of that became & again. Decode once to get &, and once more to get &. Use “Use as input” to decode the result again.