HTML Entities Encode / Decode
Encode special characters to HTML entities (<, &, ©...) and decode them back. Reference table included. Runs 100% in your browser.
HTML encoding lets special characters (< > &) display as text instead of being parsed as tags. Useful when pasting code/AI output into HTML, or previewing in a blog.
Common entities reference
| Char | Named | Numeric | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quote |
| ' | ' | ' | Apostrophe |
| © | © | © | Copyright |
| ® | ® | ® | Registered |
| ™ | ™ | ™ | Trademark |
| € | € | € | Euro |
| £ | £ | £ | Pound |
| ¥ | ¥ | ¥ | Yen |
| ° | ° | ° | Degree |
| ± | ± | ± | Plus-minus |
| × | × | × | Multiplication |
| ÷ | ÷ | ÷ | Division |
| → | → | → | Right arrow |
| ← | ← | ← | Left arrow |
| |   | Non-breaking space |
When you need HTML encoding
- Display code/text on a web page: pasting
<div>into HTML would render as a real tag — encode to<div>to show it as text. - Embed AI output in a blog: ChatGPT/Claude outputs containing
<,>need encoding to render correctly. - URL query strings:
&in a URL must be escaped to&so it isn't parsed as a separator. - XSS prevention: encoding user input before injecting it into HTML is the most basic XSS defence.
- HTML email: email clients are strict — encoding avoids broken templates from special characters.
Three entity formats
- Named:
< & ©— most readable, but not all characters have a name. - Decimal:
<— universal, supported in every browser. - Hex:
<— compact for high Unicode (emoji, CJK).
Tips
- Toggle "Encode all non-ASCII" for maximum safety — Vietnamese, emoji, CJK all become numeric entities.
- By default only the 5 critical chars are encoded (
< > & " ') — enough for 95% of use cases. - Auto-decode happens as you paste into the right box — no button click needed.
Who this is for
Content writers, editors, SEO specialists, devs handling text/markdown — URL slugs, char counts, regex testing, SQL formatting.
FAQ
Does this support Vietnamese diacritics?
Yes. All text tools fully support Vietnamese Unicode, including modern diacritic rules.
Is my pasted text saved?
No. Text only exists in the current tab. Refresh or close = gone. TopDev stores nothing.
Related tools
See all tools →Regex Tester
Test regex live with match highlighting. 7 ready presets including Vietnamese.
NEWRemove Vietnamese diacritics
Strip diacritics for slugs, filenames, usernames, identifiers. Optional đ → d.
NEWURL Slug Generator
Title → SEO-clean URL slug. Strip diacritics, lowercase, custom separator.
NEWChar / Word / Line Counter
Real-time char/word/line/paragraph count + SEO meta (60/160) and tweet (280) meters.