Free tool · HTML entities
Free HTML encoder and decoder
Encode text as HTML entities so code shows as code, or decode <, é and ’ back into characters. Named, decimal or hex. Runs in your browser.
Decoded HTML is published as the page itself; encoded text is published as a code sample people can read and copy. Published free with no signup, it is live for 7 days; sign up free to keep it. A published page is public to anyone with the link and noindex.
How it works
Encode or decode HTML entities in three steps
Pick a direction
Encode turns characters into HTML entities, so code shows as text on a page. Decode turns entities like < and é back into the characters they stand for.
Paste the text
The result updates as you type. When encoding, choose which characters to escape and whether entities are named (é), decimal (é) or hex (é).
Copy, swap, or publish
Copy the result, swap it back into the input to check the round trip, or publish it as a page: decoded HTML as the page itself, encoded code as a readable code sample.
Where it helps
HTML encode and HTML decode, for the text you get handed
Show code on a page
A snippet pasted into a blog post, a doc or a CMS field disappears or breaks the layout, because the browser reads its tags. Encoded, it shows as text, exactly as written.
Read escaped HTML
HTML stored in JSON, XML, a database export or an email source often arrives as <div>. Decode it to get the markup back, then preview or publish it.
Fix mojibake and odd symbols
Accents and symbols that turned into é, ’ or in an export decode to the characters they stand for. Text encoded twice shows as &lt; and decodes in two passes.
The next step
Share the result as a page
Noindex by default
Published pages tell search engines to stay away, so a code sample or a page you share won’t surface on Google the way most free paste sites can.
Password protection
On Solo and Team, lock a page with an encrypted password we can’t read, enforced before the page ever loads.
View tracking
A snippet pasted into a chat goes quiet. A page counts every view, and Solo and Team add unique viewers, country and time on page.
More free tools
Other viewers and converters
HTML viewer
Paste the decoded HTML and see the rendered page, desktop and mobile, in a sandboxed frame.
Open the HTML viewer →HTML formatter
Decoded markup on one long line? Beautify it with a 2 or 4 space indent, or minify it.
Format HTML →HTML to text
Strip the tags from any HTML and keep the readable text, with lists, tables and line breaks intact.
Convert HTML to text →HTML encoder FAQ
An HTML encoder replaces characters that have a meaning in HTML with character references, also called HTML entities: < becomes <, > becomes >, & becomes &, and quotes become " and '. The browser then shows those characters as text instead of reading them as markup. An HTML decoder does the reverse.
For text that goes inside HTML, the five special characters are enough, and that is the default: & < > " and '. Choose + non-ASCII when the page or the system in between might not handle UTF-8, so accented letters, symbols and emoji are written as entities too. Everything encodes every character except letters, digits, spaces and line breaks.
They mean the same character. é, é and é all display é. Named entities are easier to read but exist only for some characters; this tool uses the HTML 4 names, which every browser and email client knows, and writes a decimal number for the rest. Decimal and hex work for any character, emoji included.
The text was encoded twice, so one decode only removes the outer layer: &lt; becomes <. The tool tells you when the result still holds entities, and Decode again removes the next layer. Names it does not know are left exactly as written and listed below the result.
No. Encoding and decoding run in JavaScript inside this browser tab, and nothing you paste is sent to a server or stored. It leaves your device only if you press Publish.