HTML entity encoder & decoder
Paste text to escape the characters that have special meaning in HTML, or paste encoded markup to decode the entities back. It handles named and numeric entities and runs entirely in your browser.
Encode or decode
Open the tool in the mode you need — each has its own page:
How to encode or decode HTML entities
- Choose Encode (text → entities) or Decode (entities → text).
- Paste your text; the result updates as you type.
- Copy the result — turn on "encode all non-ASCII" if you need it.
About HTML entities
Some characters cannot appear literally in HTML: an ampersand starts an entity, and angle brackets open and close tags. Replacing them with entities — &, <, > — lets the text display as written instead of breaking the markup. Quotes are escaped too when text goes inside an attribute.
Encoding here covers the reserved characters by default, with an option to escape every non-ASCII character as a numeric entity for maximum portability. Decoding uses the browser's parser, so it understands the whole named-entity set. It all runs locally — instant, private and free.
The most common encoding job is showing code on a web page: paste a snippet containing < or & into HTML unescaped and the browser swallows it as markup, silently truncating your example. The most common decoding job is the reverse — text copied from a page's source or an RSS feed arrives littered with & and <. Note that HTML escaping is its own scheme: it is not interchangeable with URL percent-encoding or JavaScript string escapes, so use the escaper that matches the destination.
Numeric entities come in two spellings for the same character: decimal © and hexadecimal © both mean the copyright sign, because each simply names a Unicode code point. Escaping non-ASCII characters this way mattered most when pages and emails travelled through systems with mismatched character encodings; with UTF-8 now the norm you rarely need it, but it remains handy for characters that are invisible or easily confused, like non-breaking spaces and typographic dashes.
Frequently asked questions
What are HTML entities?
HTML entities are codes like &, < and © that represent characters which are reserved in HTML (such as &, < and >) or hard to type, so they display correctly instead of being interpreted as markup.
Which characters does encoding escape?
By default it escapes the five reserved characters: & < > " and the apostrophe. Turn on "encode all non-ASCII" to also convert accented letters, symbols and emoji to numeric entities.
Does decoding support named entities?
Yes. Decoding uses the browser's own HTML parser, so the full set of named entities (like © and ) and numeric entities (© or ©) are all supported.
Is my text uploaded?
No. Encoding and decoding happen entirely in your browser, so whatever you paste never leaves your device.
Why does my page show & instead of an ampersand?
That is double encoding: text that already contained & was encoded again, producing &amp; in the source, which browsers render as the literal five characters &. It commonly happens when a CMS or template escapes output that was escaped once before. Paste the offending text into Decode here to see how many layers it has, then remove the extra encoding step in your pipeline.