Free Tool
HTML Entity Encoder & Decoder
Encode special characters to HTML entities and decode them back to plain text. Supports named entities (&, <, ©…) and numeric entities (decimal & hex). Free, no sign-up.
HTML Entity Encoder
HTML Entity Decoder
Common HTML Entities
&&<<>>""'' ©©®®™™——€€……What are HTML entities?
Certain characters have special meaning in HTML: < starts a tag, > ends one, & starts an entity, and " delimits attributes. To display these literally, they must be encoded as <, >, &, and ".
When encoding is required
Encode when inserting user-supplied text into HTML to prevent XSS. Also encode characters outside the ASCII range if your document charset is not UTF-8.
Named vs numeric entities
Named entities like & are readable. Numeric entities (& or &) work for any Unicode character that lacks a named form.
How to use
- Paste your text into the input area.
- Click "Encode" to convert reserved characters to HTML entities, or "Decode" to convert entities back to plain text.
- Copy the result with the "Copy" button.
Frequently Asked Questions
- What are HTML entities?
- HTML entities are special codes used to represent characters that have meaning in HTML syntax or that are not easily typed. For example, & represents &, < represents <, and > represents >. They prevent browsers from misinterpreting special characters as HTML tags.
- When do I need to encode HTML entities?
- You need to encode HTML entities when inserting user-supplied text into HTML to prevent XSS (cross-site scripting) attacks. Characters like <, >, &, and " must be encoded so browsers treat them as text, not HTML markup.
- What is the difference between & and &?
- & is a named entity reference for the ampersand character. & is the same character expressed as a decimal numeric entity. & is the hexadecimal form. All three produce the same & character.
- What is ?
- is the HTML entity for a non-breaking space — a space character that prevents line breaks at that position. Unlike a regular space, browsers will not collapse multiple entities into one.