- All tools
- HTML entity encoder & decoder
How do I encode or decode HTML entities?
Paste text and choose Encode to turn it into HTML entities, or choose Decode to turn entities such as &, © and é back into ordinary characters. By default only the five reserved characters (& < > " ') are escaped; you can also convert accents and symbols to named or numeric entities, in decimal or hex. Decoding uses your browser’s own HTML parser and never runs anything. Encoding is not a substitute for proper output escaping in your application.
- Choose Encode or Decode and paste your text.
- For Encode, pick how much to convert: reserved characters only, named entities, or numeric.
- Copy the output, or click any entity in the list below to copy it.
Common HTML entities
| Character | Entity (click to copy) | Decimal | Hex | Description |
|---|
No entity in this list matches your search. Any Unicode character can still be written as a numeric entity, such as €.
What this page can do
- Escape the five reserved HTML characters for safe embedding
- Convert accents and symbols to named entities, with numeric entities where no name exists
- Write numeric entities in decimal or hexadecimal
- Decode named, decimal and hex entities with the browser’s own HTML parser
- Search about 70 common entities and copy one with a click
- Swap output into input to round-trip text
When to use this page
- Showing code or a snippet with < and & on a web page without the browser treating it as markup.
- Putting accents, © or € into an ASCII-only email template or legacy system.
- Reading text full of & and ’ copied from a feed, export or page source.
When to use something else
- You need to sanitise or escape user input in a live application — use your framework’s context-aware escaping or a sanitiser.
- You need to escape text for a URL — use the URL encoder; percent-encoding follows different rules.
- You need to escape text for JSON, JavaScript strings or SQL — those use different escapes.
How it compares with other options
Template engines and frameworks escape output automatically, and languages have their own helpers, such as html.escape in Python or textContent in the DOM. This page is for manual jobs: a snippet for a blog post, an email template or a bug report. Decoding relies on the same HTML parser your browser uses for web pages, so it knows every named entity, including ones that are not in the short reference list here.
Where your text goes
Nowhere. Everything is computed by your own browser. Nothing you paste is sent to a server, logged or stored — close the tab and it is gone. You can check it yourself: open your browser’s network panel — the page still loads its own code and any ads, but no request carries what you typed.
Questions about this tool
What is the difference between named and numeric entities?
A named entity such as © is easy to read, but only a fixed list of names exists. A numeric entity such as © (decimal) or © (hex) works for any Unicode character, including emoji. Browsers treat both the same; named entities are simply more readable in source code.
Is HTML-encoding enough to protect my site from XSS?
No. This page escapes text so that it displays literally, but safe output depends on where the text is placed: HTML body text, attribute values, URLs, JavaScript and CSS each need different escaping. Use your framework’s context-aware escaping or a sanitiser, and treat this page as a helper for manual work.
Do I need to encode accents and Chinese characters?
Usually not. If your page is saved as UTF-8 and declares a UTF-8 charset, characters such as é, ü or 中 can be written directly. Convert them only when the file or channel is limited to ASCII, such as some email templates, legacy systems or source code you want to keep plain.
Is it safe to decode HTML I do not trust?
On this page, yes. Decoding runs the browser’s HTML parser on an inert document that is never shown, so scripts and images in the text do not run or load, and tags in your input stay as plain text; only the entities are converted. Be careful when you paste the decoded result into a live web page.