About the HTML Entity Encoder / Decoder
Convert characters like <, >, & and quotes into HTML entities so they display safely in web pages, or decode named and numeric entities back into plain text.
Key features
- Escape the five HTML special characters: & < > " '
- Encode all non-ASCII characters as named, decimal or hex entities
- Decode every named entity ( , ©, é…)
- Decode decimal (é) and hex (é) references
- Emoji and characters beyond the BMP handled correctly
- Runs locally in your browser
Escape and unescape HTML
When you want to show code like <div> on a web page instead of having the browser interpret it, special characters must be written as HTML entities. This tool converts text to entities and back.
The essential entities
| Character | Named | Decimal | Hex |
|---|---|---|---|
& | & | & | & |
< | < | < | < |
> | > | > | > |
" | " | " | " |
' | ' | ' | ' |
| Non-breaking space | |   |   |
Other common entities
| Character | Entity | Character | Entity |
|---|---|---|---|
| © | © | € | € |
| ® | ® | £ | £ |
| ™ | ™ | ° | ° |
| — | — | × | × |
| – | – | … | … |
Encoding modes
| Mode | Café <b> becomes |
|---|---|
| Special characters only | Café <b> |
| Named where possible | Café <b> |
| Decimal | Café <b> |
| Hex | Café <b> |
Common uses
- Showing code snippets in blog posts and documentation.
- Cleaning scraped text full of
&and'. - Preparing content for XML, RSS feeds and email templates.
Related tools
Strip tags completely with HTML to Text, or turn Markdown into HTML with Markdown to HTML.
How to use the HTML Entity Encoder / Decoder
- Type or paste your text into the input box.
- Choose the options you want.
- The result updates instantly as you type.
- Copy the output or download it as a .txt file.