About this tool
In HTML some characters have a special meaning: < and > delimit tags, & starts a character reference and quotes enclose attribute values. If such a character should appear as text, it must be escaped – as an HTML entity like < or &. Otherwise it is interpreted as code, which can break pages or cause security holes (cross-site scripting).
This tool converts text to entities and entities back to readable text. Besides escaping the special characters, it can output all non-ASCII characters – accented letters, the euro sign, typographic quotes or emojis – as named (ö), decimal (ö) or hexadecimal (ö) references. Both fields are editable.
For percent-encoding in addresses use the URL Encode / Decode, for Base64 the Base64 Encode / Decode converter.
How it works
- Paste text into the left field – it appears with entities on the right. Or paste code with entities on the right to decode it.
- Choose the mode: “HTML special characters only” for HTML-safe text, or “Named”, “Decimal” or “Hexadecimal” for pure ASCII output.
- Copy the result.
Frequently asked questions
Do I need entities for accented letters in HTML?
No, not if the page is served as UTF-8 – which is the standard today. Entities for accented letters are only needed when a system handles ASCII only, such as old e-mail templates or certain databases.
Which characters must always be escaped?
In text & and <, in attribute values also the quote you use. > and the other quote do no harm but are often escaped as well for consistency – this tool does the same.
What is ?
A non-breaking space: it looks like a regular space but prevents a line break, e.g. between number and unit as in “5 kg”.
Why are some entities not decoded?
The tool knows the common named entities from HTML 4 and all numeric references. Rare HTML5 names like ★ stay unchanged. Numeric forms like ★ are always recognized.