World’s largest virtual agentic engineering & quality conference
The HTML character encoder online converts certain characters to special strings, called HTML entities, that can be read by a browser. This tool is built and maintained by TestMu AI (formerly LambdaTest).
The HTML entities to text encoder converts certain characters to their corresponding HTML entities. These characters have special significance in HTML and can be converted to their related HTML entities.
The tool converts HTML entities back into their plain-text characters so the content becomes readable. Many characters, such as the ampersand and the angle brackets, are part of HTML syntax and are stored as entities. For example, the entity & is decoded to &, < becomes <, and > becomes >, giving you clean, human-readable text.
It provides the ability to save and share the text while converting the HTML Entities decode text to plain text. Any HTML Entities file can be imported and converted into text with the help of this free tool. To preserve the meaning of certain characters in HTML, they have to be converted into their correct HTML Entities and vice versa. You can convert the characters in HTML Entities to text easily.
Use this free tool to convert your HTML Entities text into plain text so that it’s readable since some elements of the text have characters that are a part of the HTML syntax.
Beyond this online converter, you can decode HTML entities directly in your own code. Every major language ships a tested function or library that turns entities such as &, <, and © back into their original characters. Each snippet below takes the encoded string Tom & Jerry <3 and returns the readable text Tom & Jerry <3.
In the browser, the built-in DOMParser API decodes entities with no external dependencies:
function decodeEntities(str) {
const doc = new DOMParser().parseFromString(str, "text/html");
return doc.documentElement.textContent;
}
decodeEntities("Tom & Jerry <3");
// Output: Tom & Jerry <3In Node.js (or the browser via a bundler), the popular he library decodes named, decimal, and hexadecimal entities reliably:
import { decode } from "he";
decode("Tom & Jerry <3");
// Output: Tom & Jerry <3Python 3 includes html.unescape in its standard library, so no external package is needed:
import html
html.unescape("Tom & Jerry <3")
# Output: 'Tom & Jerry <3'PHP provides html_entity_decode, which converts every entity back to its character. Pass ENT_QUOTES so both single and double quotes are handled:
<?php
echo html_entity_decode("Tom & Jerry <3", ENT_QUOTES, "UTF-8");
// Output: Tom & Jerry <3
?>Every HTML entity starts with an ampersand (&) and ends with a semicolon (;). The same character can be written in three different ways:
| Character | Named | Decimal | Hexadecimal |
|---|---|---|---|
| & | & | & | & |
| < | < | < | < |
| > | > | > | > |
| " | " | " | " |
| ' | ' | ' | ' |
| © | © | © | © |
Browsers require entities for &, <, and > because those characters are reserved by HTML syntax. The rest are optional but keep markup portable across different character encodings.
HTML entity decoding and URL decoding are often confused because both turn encoded text back into readable characters, but they belong to two different systems.
So what is %27? %27 is the percent-encoded (URL-encoded) form of the single quote character. The 27 is that character's code point in hexadecimal (39 in decimal). It is not an HTML entity; its HTML equivalents are ' and '. If you see %27 in a string, decode it with a URL decoder; if you see ', decode it with this HTML entities to text converter.
Paste the encoded string into the input box above and click Convert to Text. The tool replaces named HTML entities with their original characters. In code, use html.unescape() in Python, html_entity_decode() in PHP, or the he library or DOMParser in JavaScript.
HTML entity decoding converts references like & or © that appear inside HTML markup. URL decoding converts percent-encoded sequences like %26 or %27 that appear inside web addresses. They are separate encoding schemes, so a single quote is ' in HTML but %27 in a URL.
It decodes the standard named HTML entities, including &, <, >, ", ©, and the full Latin-1 set of accented letters, symbols, and punctuation. Paste your entity-encoded text and click Convert to Text to see the readable result.
To go the other way and encode characters into entities, use the Free Text to HTML Entities Converter, which turns characters like &, <, and > into their entity form.
Did you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance