HTML Decoder

Turn HTML entities back into their characters with the browser's own parser. It handles the amp, lt, gt and quot references and any other named or numeric reference.

Developer Tools● Free No upload Instant

Loading HTML Decoder…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Paste text full of HTML entities and the tool turns them back into the characters they stand for, using the browser's own HTML parser. It handles far more than the basic five: every named entity (the copyright sign, the em dash and hundreds more) and every numeric reference, decimal or hexadecimal, including emoji. It decodes through a detached, non-rendering element, so nothing in the input executes. Your browser does all the work.

What the HTML Decoder does

Paste HTML-encoded text and you get the readable original: the amp reference becomes an ampersand, the lt and gt references become the angle brackets, and named references like the copyright or em-dash entity, plus numeric references in decimal or hex, all turn back into their characters.

It is the broad inverse of HTML encoding. Where the encoder touches only five characters, this decoder understands the browser's full entity table, so it can undo entities produced by any tool, content management system or template, not just the basic set.

How it works

The tool sets your text as the inner HTML of a detached textarea element, then reads that element's value back. The browser's parser resolves every entity, named or numeric, to its character during that step. The decoder covers so much because it borrows the engine the browser uses to render pages.

A textarea is used on purpose. Its contents are treated as plain text rather than live markup, so even if the input contains a script or image reference, nothing runs or loads. The entities are decoded and the markup stays inert.

Data source & conversion logic

  1. Take the encoded text. Read the entity-laden text you pasted.
  2. Hand it to the parser. Set it as the inner HTML of a detached textarea so the browser resolves the entities.
  3. Read back the value. Take the textarea's decoded text value, in which every named and numeric reference is now a character.
  4. Return it safely. Because a textarea treats content as text, no markup in the input runs or loads.

What it decodes

amp entity → ampersand lt entity → less-than gt entity → greater-than quot entity → double quote named references (copyright, em dash, and more) → their characters numeric references, decimal or hex → their characters

It decodes the browser's entire entity set, not just the five the HTML encoder produces. The pair is asymmetric on purpose.

Privacy

Your browser decodes the text with its built-in parser, so encoded content with private data stays on your device.

The decoder is built to be safe: because it resolves entities inside a non-rendering textarea, pasted markup is turned to text, not run. Even so, treat any decoded markup from an untrusted source with care before putting it into a live page.

Technical details

Methodbrowser parser (detached textarea)
Decodesall named entities plus numeric (decimal and hex)
Scopebroader than the five-character encoder
Safetyinput not executed or rendered
ReversesHTML encoding, and entities from any source
Where it runsIn your browser, nothing uploaded

Standards & references

  • HTML character references: entities come in named form (an ampersand, a name and a semicolon) and numeric form (a decimal or hexadecimal code point). The browser parser resolves all of them.
  • Browser-native decoding: the tool uses the browser's own parser, so it decodes what a real page would and covers the full entity table rather than a hand-written list.
  • Safe by construction: decoding inside a textarea treats the input as text, so scripts and other markup in the input do not execute or load.

Accuracy and limits

It decodes far more than the HTML encoder produces. The encoder here touches five characters; this decoder understands the browser's whole entity table, so it will happily undo a copyright sign, an em dash or a hex emoji reference that the encoder never creates. The pair is intentionally asymmetric.

A bare ampersand that is not part of a valid entity is left as-is. Browsers are lenient about these ambiguous ampersands, so stray ones in your input pass through unchanged rather than causing an error.

It expects entities, not percent-codes. A URL-style %20 is not an HTML entity and will not be decoded here; use a URL decoder for that. This tool only resolves HTML character references.

Decoded markup is inert in this tool but not automatically safe to reuse. The textarea stops anything from running here, yet if you paste the decoded HTML into a live page, the usual cross-site-scripting precautions apply.

Double-encoded entities decode one layer at a time. If text was encoded twice, one pass through this decoder removes one layer; run it again to fully restore the original.

Where people use it

Reading encoded HTML

Turn an entity-filled snippet back into readable text or markup.

Cleaning exported content

Decode entities in text pulled from a CMS, feed or database.

Debugging templates

See the real characters behind a string of references.

Recovering text

Restore quotes, dashes and symbols that were stored as entities.

When it fits, and when it doesn't

Good for

  • Decoding any named or numeric HTML entity
  • Reversing HTML encoding from any source
  • Cleaning entity-laden CMS or feed text
  • Reading an encoded snippet as plain text

Not the best choice for

  • Decoding URL percent-codes
  • Guaranteeing decoded HTML is safe to reuse
  • Undoing Base64 or encryption
  • Encoding text into entities

Looking at percent-codes like %20? Use the URL decoder. Want to encode instead? Use the HTML encoder. Reusing the result in a live page? Re-encode or sanitise it for that context first.

Frequently asked questions

What does the HTML decoder do?
It turns HTML entities back into the characters they represent: the amp reference into an ampersand, the lt reference into a less-than sign, and any other named or numeric reference into its character.
Why does it decode more than the HTML encoder makes?
It uses the browser's full parser, which knows the entire entity table: hundreds of named entities plus all numeric references. The encoder only produces five, so the decoder is deliberately broader.
Does it handle numeric references?
Yes, both decimal and hexadecimal numeric references, including the ones for emoji and uncommon symbols. The browser parser resolves them all to their characters.
Is it safe to decode untrusted HTML here?
Decoding happens inside a textarea, which treats the input as text, so nothing runs or loads while you decode. But if you then paste the decoded markup into a live page, apply the usual sanitisation first.
Why is a lone ampersand left unchanged?
An ampersand that is not part of a valid entity is an ambiguous ampersand; browsers leave it as a literal ampersand rather than erroring, and so does this tool.
Can it decode percent-codes like %20?
No. Those are URL encoding, not HTML entities. Use a URL decoder for percent-codes; this tool only resolves HTML character references.
Is it the exact reverse of the HTML encoder?
It reverses it and more. Encoding five characters then decoding here returns your original, but the decoder will also undo entities the encoder never creates, because it understands the whole entity set.
Does it decode entities inside attributes too?
It decodes the entity text you paste regardless of where it came from. It treats the whole input as a string of text and references, returning the decoded characters.
What about double-encoded text?
Each pass removes one layer. If something was encoded twice, decode twice; the first pass turns the outer entities back into entity text, and the second restores the characters.
Is decoding the same as decryption?
No. Entities are a display encoding, not security. Decoding restores the original characters and breaks nothing.
Is my text uploaded?
No. Your browser decodes the text with its own parser, and the text stays on your device.
How do I encode text back into entities?
Use the HTML encoder, which escapes the five HTML-special characters into references.

References

Checked against this tool's code: it hands the text to the browser's own parser inside a detached textarea. That resolves the full named and numeric entity set, far more than the five the encoder produces, and keeps the input inert (nothing runs or loads during decoding).

PopularHot

JSON Formatter

Pretty-print messy or minified JSON with 2-space indents.

DeveloperOpen
Popular

JSON Validator

Paste JSON and find out whether it parses.

DeveloperOpen
Popular

Base64 Encoder

Standard Base64 for any text, emoji included.

DeveloperOpen
Popular

Hash Generator

MD5, SHA-1 and the SHA-2 hashes of any text, as you type.

DeveloperOpen
Popular

UUID Generator

Up to 500 random version 4 UUIDs at once.

DeveloperOpen
Trending

CSS Minifier

Strips comments and whitespace to put a stylesheet on one line.

DeveloperOpen

Back to the HTML Decoder

Paste, run and copy. The code stays in your browser and you don't need an account.