HTML Decode
Decode HTML entities back into readable text. Paste encoded content, convert it instantly, then copy the clean text for editing and reuse.
HTML Decode
SIMILAR TOOLS
What the HTML Decode tool does
This turns HTML entities back into the plain characters they stand for. Paste in the encoded text, press Convert, and copy or download the result. For example, < becomes a less-than sign < and & becomes a plain ampersand &. It is the reverse of the HTML Encode tool, which is also where the fuller explanation of what these entities are and why they exist lives.
It runs in your browser, so nothing you enter is uploaded.
How to use it
- Paste your encoded HTML. Enter the text containing the entities.
- Press Convert. The decoded text appears, ready to Copy or Download.
How it reads entities
HTML entities come in a few shapes, and this tool understands all of them. There are the named ones, like < for a less-than sign and " for a double quote, which read almost like words. There are numeric ones written in plain decimal, like <, which is just the character's code number. And there are numeric ones written in hexadecimal, like <, the same code in base 16. All three of those examples point to the very same less-than sign. The tool recognises each form, looks up the character it represents, and gives you the readable result, so it does not matter which style the encoded text happens to use.
When you would use it
You meet encoded HTML whenever text has been made safe for a web page and you now want the original back. You might be reading the raw source of a page, or data from an API or a database, and find it peppered with entities like & and ' where the real characters should be. Pasting it here turns it back into the plain, readable text a person actually wrote, which is handy for checking content, copying it out cleanly, or simply understanding what something says underneath the encoding.
The library doing the work
The decoding is handled by he, a well-regarded HTML entity library written by Mathias Bynens. It knows the full set of named entities as well as the numeric forms, so it can turn any valid entity back into its character reliably.
Going the other way
If you have plain text and want to make it safe for a web page, that is the opposite job, handled by the HTML Encode tool. This one turns entities into characters; that one turns special characters into entities. Note too that this is HTML decoding, not URL decoding, which deals with the percent codes in web addresses and is handled by the URL Decoder tool.
Questions people ask
How do I turn HTML entities back into text?
Paste the encoded text here and press Convert. Each entity, whether named or numeric, is turned back into the character it stands for.
Does it handle both named and numeric entities?
Yes. It understands named entities like <, decimal numeric ones like <, and hexadecimal ones like <, all of which it converts back to the right character.
Is this the same as URL decoding?
No. This turns HTML entities back into characters. URL decoding turns the percent codes found in web addresses back into characters, which is the URL Decoder tool's job.
References
- Bynens, M. he: A robust HTML entity encoder/decoder (npm package). https://www.npmjs.com/package/he
- WHATWG. HTML Standard, Named character references. https://html.spec.whatwg.org/multipage/named-characters.html
Bhabin Khadka is a software engineer and graduate student at the University of New England with experience in backend development and scalable systems. He has a particular interest in file systems and the kinds of technical utilities that depend on dependable handling of structured data. At Eon Tools, he reviews file and document tools, as well as encode and decode tools.