HTML Entity Encoder & Decoder - Named or Numbered
Writing a tutorial that shows actual tags? Publishing user comments safely? The moment text containing <, > or & goes into a web page unescaped, the browser treats it as markup. Encoding it into entities makes it display exactly as written - and this tool also decodes, for when you inherit markup full of © and —.
How to use the HTML Entity Encoder
- Paste or type your text.
- Choose Named style for readable entities or Numbered style for maximum compatibility.
- Click Encode - or Decode to turn entities back into text.
How it works
An HTML entity is a code the browser swaps for a character when rendering: < displays as <, & as &, © as ©. Every character also has a numeric form based on its Unicode code point - © is ©. Named mode uses the friendly name where one exists in this tool's table and falls back to numbered form for the five markup-critical characters; Numbered mode encodes every special and non-ASCII character numerically, which some older systems handle more reliably. Decoding uses the browser's own HTML parser, so every named and numbered entity the platform knows is understood.
Worked example
The sentence "Tom & Jerry <3 © 2026" typed as Tom & Jerry <3 © 2026 encodes in Named style to Tom & Jerry <3 © 2026 - paste that into a web page and visitors see exactly the sentence you typed, heart included.
Frequently Asked Questions
Is this HTML entity encoder free?
Yes - free, with no sign-up and no limits.
Named or numbered - which should I choose?
Named entities are easier for humans to read in source code. Numbered entities work everywhere, including very old systems and XML contexts where some names are undefined. Both display identically.
Why must & and < always be encoded?
Because they are the two characters HTML itself is built from: & starts an entity and < starts a tag. Left raw, they corrupt the page structure.
Can it decode any entity?
Decoding runs through the browser's own parser, so it understands the full standard set of named entities as well as decimal and hexadecimal numeric forms.
Is my text uploaded?
No - encoding and decoding happen entirely in your browser.
Related Developer Tools
JSON Formatter
Validate, pretty-print and minify JSON, with the exact position of any error.
Base64 Encoder & Decoder
Encode text and files to Base64, or decode it back - UTF-8 safe, URL-safe option included.
URL Encoder & Decoder
Percent-encode text and URLs safely, with a per-character breakdown table.