HTML Entity Encoder & Decoder
Turn <, >, & and quotes into safe HTML entities, or convert entities such as & and 😀 back into readable text. All work happens in your browser.
Free Runs locally No signup
Input
Output
The converted text will appear here.
Encoding and decoding happen locally in your browser.0 → 0 chars
How to use it
1
Choose a direction
Switch between encoding text for HTML and decoding an entity string back to plain text.
2
Paste your content
Drop text or entities into the input box; the result updates immediately.
3
Copy the result
Copy or download the output, then paste it into your template, CMS or code.
Why use this tool
Reserved characters first
Ampersands, angle brackets and quotes are always escaped, so markup cannot break out of its context.
Named or numeric entities
Encode only reserved characters or every non-ASCII character, using names such as © when one exists.
Emoji and accents
Characters outside the Basic Multilingual Plane are written as correct hexadecimal code points.
Frequently asked questions
What is an HTML entity?
An entity is a short code that represents a character HTML would otherwise misread, such as < for a literal less-than sign.
What is the difference between named and numeric entities?
Named entities use a word, such as ©, while numeric entities use a code point, such as © or ©. Both render the same character.
Does escaping prevent XSS?
Escaping is only one layer. Untrusted HTML still needs server-side sanitisation; never rely on client-side encoding alone for security.
Why did & become &amp;?
The ampersand itself is escaped, which is correct when the text is inserted as HTML. Decode first if the input was already escaped.
Are emoji supported?
Yes. Characters above U+FFFF are encoded as one numeric entity with the full code point, and decoded back correctly.
Related tools
Developer Tools Base64 Encoder & Decoder Encode text to Base64 or decode Base64 back to text, with full UTF-8 and URL-safe support. Runs locally in your browser — no upload, no signup. Developer Tools URL Encoder & Decoder Encode or decode URLs and query strings with correct UTF-8 percent encoding. Switch between component and full-URL modes, all in your browser. Developer Tools JSON Formatter & Validator Format, validate and minify JSON in your browser. Choose 2 or 4-space indentation, sort keys, and copy the result instantly. Free, private, no signup. Text Tools Text Line Tools Sort lines, remove duplicates, trim spaces, strip accents and drop empty lines in your browser. Everything updates as you type. Text Tools Word & Character Counter Count words, characters, Chinese characters, sentences and paragraphs as you type. Includes reading time and works entirely in your browser. Developer Tools CIDR & Subnet Calculator Calculate the network, broadcast, usable host range, netmask and wildcard of any IPv4 or IPv6 CIDR block. Split subnets and test IP membership.
Last updated: