HTML Entity Encoder and Decoder
Common entities
How to encode or decode HTML entities
- Type or paste text into Input. With Encode, the output has < for <, > for >, & for &, " for " and ' for ', so it shows as text in a web page instead of being read as HTML.
- To also turn accented letters, symbols and other non-ASCII characters into entities, choose a name where there is one (©, €) or numbers for everything (©, €).
- Switch Mode to Decode to turn entities, named or numeric, back into the characters they stand for. Copy output copies the result.
Frequently asked questions
What is an HTML entity?
A way to write a character in HTML with an ampersand, a name or number and a semicolon, such as < for < or € for €. Browsers show the character, not the code.
Which characters must be encoded?
In text, < and & always; > is safest too. Inside attribute values, also the quote that wraps the value, " or '. Encoding all five, as this tool does, is safe everywhere.
Do I need entities for accents and other languages?
Not in a page saved as UTF-8, which nearly every page is today: é, ü, ñ, я or 東 can be written as they are. Entities for them help only in places that cannot carry UTF-8, such as some old email systems.