Some characters have special meaning in HTML — like <, >, and &. To display them as text, you use HTML entities. This guide covers the most common ones and how to work with them.
1. What are HTML entities?
An HTML entity is a sequence of characters that represents another character. They start with & and end with ;. For example, & displays as &, and < displays as <.
2. Common entities you should know
&— ampersand (&)<— less than (<)>— greater than (>)"— double quote (")'— apostrophe (') — non-breaking space©— copyright symbol (©)®— registered symbol (®)
3. Why use them?
If you write <script> in HTML, the browser tries to interpret it as a tag. Wrapping it in entities — <script> — makes it display as text. This is essential for displaying code snippets on a webpage.
4. How to encode or decode
Open the HTML Encoder or HTML Decoder, paste your text, and click Encode or Decode. This is useful when posting code examples in blog comments or CMS fields that strip raw HTML.