About HTML Entities Encoder / Decoder
Encode special characters as HTML entities (such as < and &) or decode entities back into readable characters. Encoding protects markup when you show code on a web page, and decoding cleans up text that arrived full of entities. It never decodes twice, so &lt; correctly becomes <.
How to use HTML Entities Encoder / Decoder
- Choose Encode or Decode.
- Paste your text or markup.
- Read the converted output.
- Copy it.
Tips and good to know
- Always escape &, <, > and quotes when showing user-provided text inside HTML.
- Decoding supports about 110 common named entities plus numeric ones; unknown names are left unchanged.
- Encoding is not a substitute for a proper sanitising library on a server.
When characters must be encoded
In HTML, a few characters have special meaning: < and > start and end tags, & starts an entity, and quotes end attribute values. To show them as text they must be written as entities such as <, >, & and ". Encoding user-supplied text before inserting it into a page is a key defence against cross-site scripting, where attackers smuggle in their own script tags. Named entities like © and numeric ones like © also let you type symbols that are hard to enter on a keyboard.
When entities are needed
Five characters have special meaning in HTML: < and > start and end tags, & starts an entity, and quotes delimit attribute values. To show them as text — for example, code samples on a web page — they must be written as <, >, &, " and '. Escaping user input this way is also a basic defence against cross-site scripting (XSS).
Pages saved as UTF-8 can include accented letters and symbols directly, so named entities such as é are rarely necessary today.
Frequently asked questions
Why are some entities not decoded?
The tool includes the common named entities, not the full list of more than 2,000 from the HTML specification. Unknown names stay as they are.
Is HTML Entities Encoder / Decoder free?
Yes. HTML Entities Encoder / Decoder is 100% free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.
Are my files uploaded?
No. This tool runs in your browser, so your input stays on your device.