HTML Entity Converter
Encode characters like < > & into HTML entities, or decode named and numeric entities back into readable text. Optionally encode only the five basic characters or every non-ASCII character. All processing happens locally in your browser.
How to use
- Choose "Encode" or "Decode" at the top: encoding turns special characters into entities, decoding restores entities to readable text.
- Encode escapes only the five basic characters < > & " ' by default to keep the output readable; choose "Also encode all non-ASCII" to convert Chinese, emoji and other characters into &#number; numeric entities as well.
- Decode understands common named entities (such as © →) plus decimal and hexadecimal numeric entities; unknown names are kept as-is.
- Use "Swap" to move the result back into the input and switch direction automatically for round-trip checks; "Example" loads demo text.
- All conversion happens locally in your browser — nothing is uploaded, so it is safe to process HTML snippets containing sensitive information.
FAQ
Why is encoding only five basic characters recommended?
&, <, >, " and ' are the characters most likely to break HTML structure. Escaping them is enough to safely embed text in nodes or attributes; other punctuation and letters stay readable, keeping the output compact and clear.
What is the difference between named and numeric entities?
Named entities such as © use a meaningful name and are readable, but the set is limited. Numeric entities such as © (decimal) or © (hexadecimal) can represent any Unicode character and have the broadest compatibility.
Can decoding double-decode or mis-decode content?
No. Decoding is a single pass: each entity is resolved once, so &lt; becomes < but is not decoded further into <. Unrecognized entity names are left untouched, avoiding damage to ordinary ampersands in the text.
Is my content uploaded to a server?
No. Encoding and decoding are performed by local browser scripts — the content you paste never leaves your device.