Slug to Text
Turn a URL slug back into a readable title.
Escape text so it displays literally in HTML.
The HTML Entity Encoder escapes the characters that would otherwise be parsed as markup, so text displays literally. The default is the five characters that genuinely need it, which keeps the output readable rather than turning the whole string into entities.
Putting a less-than sign in an HTML page starts a tag. Putting an ampersand starts an entity. To display those characters literally — in a code sample, a tutorial or any user-supplied text — they have to be escaped into entities first.
Five characters genuinely need escaping in HTML: the ampersand, the two angle brackets, the double quote and the single quote. This tool escapes those by default, which is the correct minimum and keeps the output readable. It can also escape every non-ASCII character into a named or numeric entity, which is occasionally needed for email templates and older systems that mangle UTF-8. Named entities are used where one exists, since © is far more readable than ©.
Ampersand, both angle brackets and both quote characters — the five that actually need escaping.
© instead of ©, because readable source is worth more than a byte or two.
Escape every non-ASCII character for the older systems that mangle UTF-8.
Characters with no named entity get their numeric form automatically.
The page says plainly that context-aware framework escaping is the security answer, not this tool.
A code sample, a tutorial snippet or any text going into HTML.
The five required characters, or everything outside ASCII as well.
Named entities are more readable; numeric ones work everywhere.
Paste it straight into your page and it will display literally.
The ampersand and the two angle brackets always. Inside an attribute value, the quote character used to delimit it must be escaped too. Escaping all five is the safe default.
For text placed in an element body, escaping these characters is the correct defence. Inside attributes, URLs or script blocks the rules differ, so use your framework's context-aware escaping rather than treating this as a security tool.
Usually not. A page declared as UTF-8 handles them natively and the source stays readable. Escape them only when the text must survive a system that mangles UTF-8, such as some older email pipelines.
Both represent an apostrophe. ' is defined in HTML5 and XML but not in HTML4, so the numeric ' is the safer choice in older contexts. This tool uses the numeric form by default for that reason.
What people who use the HTML Entity Encoder think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the HTML Entity Encoder. It takes half a minute and no account.
Write the first reviewTurn a URL slug back into a readable title.
Find the sentences that are costing you readers.
Convert text into decimal character codes.
Find and normalise every phone number in a text.
Turn a text into a clean list of its words.
Generate random strings from any character set you choose.
Count paragraphs and see how long each one really runs.
Randomise the order of a list, fairly and repeatably.