To encode HTML entities, paste your text into this HTML entity encoder and choose Encode; characters such as <, > and & become <, > and & so they display as text instead of being read as markup. Choose Decode to convert entities back to characters.
How to use the HTML Entity Encoder/Decoder
- Paste your text or the entity-encoded string.
- Choose Encode or Decode.
- Review the output.
- Copy it into your HTML or CMS.
Worked example
Encoding <b>Tom & Jerry</b> gives <b>Tom & Jerry</b>, which a browser shows as the literal text instead of bold formatting.
Tips and common mistakes
- Encode user-provided text before inserting it into a page to avoid it being read as markup.
- Ampersands in URLs inside HTML attributes should be written as &.
- Decode to read text copied from HTML source.
Frequently asked questions
What is an HTML entity?
A code such as & or < that represents a character reserved by HTML.
Do I need to encode accented letters?
Not if your page is UTF-8, though the tool can encode them if you want.
Is my text sent anywhere?
No. Conversion is local.