HTML Entities Converter
Escape text so it can sit safely inside HTML — or take entity-encoded text and turn it back into the characters it really means.
Why Entities Exist
HTML reserves a few characters for its own grammar: < and > build tags, & starts an entity, and quotes delimit attributes. To display those characters as text, they must be written as entities — <, >, &, " — or the browser will read them as markup. That is the whole idea, and it is also a security boundary: text that users type (comments, names, reviews) must be entity-encoded when a page displays it, or a user can inject tags and scripts into the page. Encoding on output is the single most common defence against cross-site scripting.
Named, Decimal and Hex Forms
The same character can be written three ways: by name (©), by decimal code (©) or by hex code (©). Browsers accept all three in HTML. The encoder here uses the familiar named entities for the core set (&, <, >, ", ') and leaves other characters as they are — unless you tick the numeric option, which converts every non-ASCII character (é, —, emoji-adjacent symbols) into decimal entities. That mode is for creaky systems and email templates that cannot be trusted with UTF-8.
Decoding Scraped or Legacy Text
The decode direction earns its keep on text pulled out of old web pages, feeds and databases, where & and friends litter the prose. Decoding once restores the intended characters; if the result still shows entities, the text was encoded twice and needs a second pass — the Swap button feeds the output back for exactly that. Note the honest limit: decoding tells you what the text says, not whether it is safe to paste into a page as markup — treat decoded third-party text as untrusted and re-encode it on display.
Frequently Asked Questions
Which characters must always be escaped in HTML?
The core set: & becomes &, < becomes <, > becomes >, and inside attributes " becomes " and ' becomes '. Escaping user-supplied text this way is the standard defence against broken markup and script injection.
What is the difference between ©, © and ©?
Nothing in effect — all three are the © symbol: named, decimal and hexadecimal forms of the same entity. Browsers accept all three; authors pick the style their codebase uses.
Why would I encode non-ASCII characters as numeric entities?
For old systems, strict HTML email templates and feeds that cannot be trusted to handle UTF-8 correctly. Modern web pages with a UTF-8 charset do not need it — é can just be é.
My decoded text still shows & in it. Why?
It was encoded twice — common in scraped and re-saved content. Decode again (the Swap button feeds output back to input) until the text is clean.