πŸ”“

HTML Decode

βœ“ Free & no signup πŸ”’ Runs 100% in your browser Updated 2026-11-25 Website Management Tools

If you have ever opened an HTML email template, a CMS database field, or a CSV export and found yourself staring at text like <div> or ' nested inside actual content, you already know the problem this tool solves. HTML encoding has a habit of being applied more than once, and each layer turns readable characters into entity soup. An HTML decoder reverses that process: every entity, named or numeric, is converted back into the single character it represents.

This tool decodes live as you paste. Type or paste anything into the input and the decoded result appears instantly in the output panel, character for character. There is no submit button to hunt for and no server involved: all conversion happens locally in your browser, so content that contains confidential material never leaves your device. It is free, requires no signup, and works on mobile as well as desktop.

The decoder handles the full set of named entities that browsers recognize, such as & for the ampersand, < and > for angle brackets, " and ' for both flavors of quotation mark,   for the non-breaking space, and hundreds of others, from accented letters to currency symbols. Numeric forms in both decimal and hexadecimal are supported too, so A and A both become the letter A.

What Is HTML Encoding and Why Does It Exist?

HTML uses the characters < and > as delimiters for tags, so any time those characters should appear as visible text rather than as markup, they must be written in an escaped form. An encoder swaps the literal character for its entity: < becomes &amp;lt;, > becomes &amp;gt;, &amp; becomes &amp;amp;, and so on. A browser then renders the entity as the original character, which keeps the document unambiguous.

The scheme works recursively, and that is where trouble begins. Encoding the string <b> once produces &amp;lt;b&amp;gt;. Encoding that result again produces &amp;lt;b&amp;gt; with a doubled prefix, and after three or four passes the text is unreadable. Double encoding is not rare: a value may be escaped when it is stored in a database, escaped again by a templating engine when it is rendered, and escaped a third time by a CMS plugin that tries to be safe. Each pass adds another layer of entities, and the only reliable fix is to decode until the text stops changing.

Two families of entities exist. Named entities use memorable words, such as &amp;copy; for the copyright symbol or &amp;eacute; for the letter e with an acute accent. Numeric entities use a code point: decimal &amp;#169; or hexadecimal &amp;#xA9; both produce the copyright sign. Numeric form is what many export tools generate because it requires no lookup table, which is why decoding tools must accept both.

How to Use the Decoder (Step by Step)

  1. Paste the encoded text into the input area. Decoding runs immediately; there is no action button to press.
  2. Read the result in the output panel. If entities remain, they were not recognized as valid entities, which usually means a typo such as a missing semicolon.
  3. If the output still contains entity-like text such as &amp;lt;, paste the output back into the input and decode again. Each pass removes one layer of encoding.
  4. Use the copy button to take the clean text into your editor, email client, or CMS field.

A worked example makes the layering concrete. Suppose a support ticket contains the fragment &amp;lt;p&amp;gt;Tom &amp;amp; Jerry&amp;lt;/p&amp;gt;. One decoding pass turns it into <p>Tom &amp; Jerry</p>. A second pass turns that into the final readable string Tom & Jerry inside paragraph tags. Knowing that decoding is idempotent-safe to repeat is the key habit: keep going until the output stops changing.

The Email and CMS Debugging Angle

HTML email is the classic breeding ground for entity problems. Email service providers escape user-entered merge fields, then the email client escapes them again, then a copy-paste into a CRM captures the doubly-encoded text. When a merge field renders as &amp;#39;Dear &amp;#123;name&amp;#125;&amp;#39; in the inbox, decoding the raw source with this tool shows exactly which layer did the extra escaping, because you can count the entity prefixes.

CMS platforms cause the same class of bug in a different way. Many store rich text as encoded HTML in the database. Export that field to CSV for a migration, and the CSV is full of &amp;lt;p&amp;gt; fragments. A developer who pastes that into a template directly gets visible tag soup on the page. Decoding first, then importing, fixes it. The same applies to WordPress database dumps, JSON API payloads that embed HTML strings, and logs that captured escaped markup.

Symptom in your textWhat happenedFix
&amp;lt;div&amp;gt; appears on the pageHTML was encoded, then the encoded string was encoded againDecode twice with this tool
&amp;#39; appears where an apostrophe should beNumeric entity was never decoded by the consuming systemDecode once; the tool converts &amp;#39; to &#39;
&amp;nbsp; gaps in exported textNon-breaking spaces were escaped for storageDecode; each &amp;nbsp; becomes a real space character
Accented names show as &amp;eacute;Named entity stored instead of the actual characterDecode; &amp;eacute; becomes the letter e with an accent

Which Entities Are Converted?

The decoder recognizes three forms. Named entities with semicolons cover the HTML5 named character reference list, several hundred entries in practice, including all the everyday ones: &amp;amp;, &amp;lt;, &amp;gt;, &amp;quot;, &amp;apos;, &amp;nbsp;, &amp;copy;, &amp;reg;, &amp;trade;, &amp;mdash;, &amp;hellip;, and the full Greek and accented-letter sets. Decimal numeric entities follow the pattern of an ampersand, a hash, digits, and a semicolon. Hexadecimal numeric entities add an x after the hash, in either upper or lower case.

One honest caveat concerns legacy named entities without a trailing semicolon, such as &amp;copy written bare. Modern HTML parsers only accept a small set of those, and tools that escape text programmatically almost always emit the semicolon form. If a bare legacy entity fails to decode, appending a semicolon in your source text will make it decode.

A second caveat: decoding is not sanitization. Turning &amp;lt;script&amp;gt; into a literal script tag is exactly what the tool is for when you are debugging, but if you plan to render decoded HTML on a live page, the content must come from a source you trust. Decoding removes the safety layer that encoding provides; it does not judge whether the markup underneath is safe. Keep encoded versions of anything untrusted, and decode only for inspection.

Decode, Encode, and the Round Trip

Decoding is the inverse of encoding, and the two operations compose cleanly. Take the string Tom & Jerry <3. Encoding produces Tom &amp;amp; Jerry &amp;lt;3. Decoding that output returns the exact original string, byte for byte, including the space and the heart symbol. That round-trip property is worth testing when you are unsure whether a pipeline is lossless: encode a known sample, run it through your storage and retrieval steps, then decode and compare. Any difference you find is a bug in the pipeline, not in the encoding scheme.

The reverse direction has its own tool on this site. If your goal is to make text safe to embed in an HTML page, you want the encoder, not the decoder. A practical rule of thumb: encode on the way into HTML documents, decode on the way out of stored or transported content. Doing both in the wrong order is how double encoding starts in the first place.

Tips and Best Practices

  • Decode repeatedly until the output stops changing. Two or three passes are common for CMS exports; the tool makes each pass cost one paste.
  • Check for the ampersand-count pattern: the number of extra &amp;amp; prefixes tells you how many encoding layers exist.
  • When debugging email merge fields, decode the raw HTML source of the rendered email, not the visible text, so you see what the client actually received.
  • For bulk CSV migrations, decode one column at a time and spot-check rows that contain apostrophes and ampersands, since those characters trigger encoding most often.
  • Remember that decoded output may contain real markup. Paste it into a plain-text editor first rather than straight into a rich-text field that might render it.
  • Entities inside attribute values decode identically to entities in text nodes, so &amp;#39; inside an href becomes a real quote, which can change what a link points to.

Frequently Asked Questions

How do I convert HTML entities back to normal characters?
Paste the encoded text into this tool and the conversion happens instantly in your browser. Every named entity such as amp for the ampersand and nbsp for the non-breaking space, plus numeric forms in decimal and hexadecimal, is replaced by the actual character it represents. If the output still looks encoded, for example it shows lt followed by a semicolon where a tag should be, paste the output back in and decode again, since each pass removes one layer of encoding.
Why does my text show things like lt; and amp; instead of < and &?
The text was HTML-encoded at least twice. This happens when content is escaped on storage, escaped again by a templating engine, and sometimes escaped a third time by a plugin or export tool. Each encoding pass adds an extra amp prefix to every entity. Decode repeatedly with this tool until the output stops changing; the number of passes you need equals the number of extra amp prefixes you can count in the text.
What is the difference between named and numeric HTML entities?
Named entities use memorable words, such as copy for the copyright symbol or eacute for an accented e, and require a lookup table to interpret. Numeric entities use a character code directly: decimal 169 or hexadecimal xA9 both produce the copyright sign. Export tools and serializers often emit numeric form because it needs no table, while hand-written HTML favors named form. This decoder accepts both forms and converts them to the same character.
Is decoding HTML entities the same as unescaping or sanitizing?
Decoding and unescaping are the same operation: entities become real characters. Sanitizing is something entirely different, namely removing or neutralizing dangerous markup such as script tags from untrusted input. Decoding actually undoes sanitization-style escaping, so it can reveal or restore markup that escaping had neutralized. Use decoding for inspection and debugging, and never render decoded output from untrusted sources on a public page without a separate sanitization step.
Does this tool work with double-encoded content from a CMS export?
Yes, and this is one of its most common uses. CMS platforms and email systems frequently stack escaping layers, producing fragments like the encoded form of lt p gt. Paste the exported text, decode once to remove the outer layer, then decode again if needed. There is no limit to how many times you can run it, and everything runs locally so confidential CMS content, customer records, and email templates never leave your device.
Why won't an entity without a semicolon decode?
Modern HTML only accepts a small legacy set of semicolon-free entities, and most encoders always emit the semicolon form because it is unambiguous. If an entity such as a bare copy fails to convert, it is probably missing its semicolon or contains a typo. Add the semicolon and paste again. Also check that the entity starts with an ampersand and that no stray spaces sit between the ampersand, the name, and the semicolon, since any interruption breaks the pattern.

Related Tools