HTML Entities to Text Converter
ED-56Paste HTML text containing entities such as & or é and get the real characters back. You can also list every entity found, with its code point.
Runs in your browser. Nothing is uploaded.
HTML text with entities
Result
How to use it
- Paste the text with entities into the input box.
- Click Entities to text to replace each entity with its character.
- Click List the entities if you want a table of what was found and what each one means.
- Copy the result or download it as a .txt file.
What gets decoded
Three kinds of reference are read: decimal such as é, hex such as é, and named entities such as é. The named ones come from a built-in table of about 250 names: the HTML 4 set plus apos and a few HTML5 additions. Numeric references from 128 to 159 are read as Windows-1252 characters, the way browsers do, so € becomes the euro sign.
Names that are not recognized
HTML5 defines roughly 2,200 named entities, and this table does not hold all of them. If a name is not in the table, the text is left exactly as typed instead of being guessed, and List the entities marks it. Named entities also need the closing semicolon to be decoded. Numeric references that point to half of a surrogate pair, or to zero, are reported as errors.
Entities only, not tags
Only entities are decoded. Tags such as <p> or <b> stay in the text, so this is not an HTML to plain text converter. If your input contains <p>, the result contains <p>, which is the correct decoded form but is now markup again. The Text to entities button turns characters back into entities if you need to reverse it.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
is half of a surrogate pair | A numeric reference such as � is only half of an emoji. | Write the whole character as one reference, for example 😀. |
is not a valid Unicode character | The numeric reference is 0 or above 1114111. | Correct the number. |
No HTML entities found | List the entities found no &...; sequences in the text. | Check that the text really contains entities. |
Questions people ask
How do I convert HTML entities to text?
Paste the text and click Entities to text. Every entity found is replaced by the character it names, so & becomes &, < becomes < and é becomes é. Text without entities is returned unchanged.
Why was an entity left as it was?
The built-in table holds about 250 names. A name outside it, for example one of the less common HTML5 entities, is left untouched instead of being replaced by a guess. A name without its closing semicolon is also left alone.
What does become?
It becomes a no-break space, character U+00A0. It looks like an ordinary space but is a different character, which matters when you search for or compare text. List the entities shows its code point.
Does this remove HTML tags?
No. Only entities are decoded. Tags like <div> remain in the text. To read an entity-encoded snippet you usually want exactly that, but it means this page is not a replacement for a tag stripper.
What is the difference between é and é?
They are the same character, é, written two ways: 233 is the decimal code point and E9 is the same value in hex. The x after the hash marks the hex form. Both decode to the same result.
How do I see which entities are in my text?
Click List the entities. You get a table with each entity, the character it stands for and its Unicode code point. Names the table does not know are marked, so you can see what was left unchanged.
About this tool
Decoding reads decimal references (é), hex references (é) and the named entities in a built-in table of about 250 names: the HTML 4 set plus apos and a few HTML5 names. HTML5 defines roughly 2,200 names, so a name outside the table is left exactly as typed. List the entities shows each one that was found with the character it stands for and its code point, and marks the names it did not know. Names need their closing semicolon to be decoded. References from 128 to 159 are read as Windows-1252 characters, as browsers do. Tags are not removed: this decodes entities and nothing else.