What Are HTML Entities? How to Show < and & on a Web Page
Updated November 2026
Written by the Toolpuffin team. Tools in this guide are tested in the browser.
Some characters have a special meaning in HTML. If you want to show them as text, you write them as an entity. This guide explains the idea and the entities you will use most.
Try the tool: HTML Entity Encoder & Decoder
Why entities exist
A browser reads < as the start of a tag and & as the start of an entity. To show these characters as plain text, you write < and & instead, and the browser displays < and &.
Source: MDN: character reference
The most common ones
| Character | Entity | Numeric |
|---|---|---|
| & | & | & |
| < | < | < |
| > | > | > |
| " | " | " |
| ' | ' | ' |
| é | é | é |
Encode or decode
- Choose encode or decode.
- Paste your text.
- Copy the result.
By default the ampersand, less than, greater than and both kinds of quotes are encoded. You can tick the extra option to also write accents and symbols as numeric codes such as é. Decoding understands both named and numeric entities.
Is it safe?
Decoding only reads the text with the browser's HTML parser. Nothing is run or inserted into the page. Encoding is part of defending against XSS, but safe output depends on where the text is placed, so use the escaping built into your framework when you build pages.
When you do not need them
If your page is saved as UTF-8, you can type letters such as é, ü and ñ directly. You only need entities for the characters that have a special meaning in HTML.