How to use HTML entity encoder & decoder
- 1
Choose Encode to escape text, or Decode to turn entities back into characters.
- 2
When encoding, pick which characters to encode and whether to write them as names, decimal or hex numbers.
- 3
Copy or download the result, or press Swap to run it the other way.
What this tool does
HTML entities are codes like < and & that stand for characters which would otherwise be read as HTML. This tool escapes text for safe use in web pages, templates and XML, and decodes entity-filled text from page sources, feeds, databases and emails back into readable characters.
Features
- Encode only the five reserved characters, or those plus every non-ASCII character.
- Three notations: named (é), decimal (é) or hexadecimal (é).
- Full decoder for every named, decimal and hex entity, including legacy forms without a semicolon.
- Swap to run the result back the other way and check it round-trips.
- Count of entities written or decoded.
Limits
- Escaping text is not the same as sanitising HTML. To show user-supplied HTML safely, also remove scripts and unsafe attributes with a proper sanitiser.
- The decoder turns entities into characters; it doesn't remove HTML tags. For that, use the text cleaner.
Where your text is processed
This tool works in your browser: what you paste is processed on your own device, so it isn't sent to our server for this tool. Some other tools on UtiloNest do use our server, and their pages say so.
Frequently asked questions
Which characters must be escaped in HTML?
The ampersand (&), less-than (<) and greater-than (>) signs in text, plus double and single quotes inside attribute values. Encoding those five is enough to show text safely in a page. The "Reserved characters" option does exactly that and leaves everything else as normal UTF-8.
When should I encode non-ASCII characters too?
Only for systems that can't handle UTF-8, such as some old email templates or legacy software. Modern web pages declare UTF-8, so characters like é, € and emoji can be written directly.
Named, decimal or hex, which is better?
All three display the same character. Named entities such as é are easiest to read but don't exist for every character, so the tool falls back to hex for the rest. Decimal (é) and hex (é) work for any character in any HTML version.
Does the decoder understand every entity?
Yes. It knows all 2,231 named references in the HTML standard, decimal and hex numbers, and the old forms that browsers accept without a semicolon, like ©.
Is my text sent anywhere?
No. Encoding and decoding run in your browser, so the text isn't sent to our server.