HTML Entity Encoder & Decoder
Escape special characters as HTML entities, or turn entities back into text. Everything runs in your browser, so your input isn’t uploaded.
Loading tool…
How to use the HTML Entity Encoder & Decoder
- Choose Encode or Decode.
- Paste your text. The result updates as you type.
- When encoding, optionally convert every non-ASCII character to a numeric entity.
Example
Encoding makes markup safe to show as text: the angle brackets, ampersand and quotes are replaced by entities.
<a href="x">Tom & Jerry</a>
<a href="x">Tom & Jerry</a>
About this tool
Characters like < and & have special meaning in HTML, so to show them as text they are written as entities such as < and &. This tool escapes text for use in a page and decodes entities back to normal characters.
Good to know
- Pasted HTML is handled purely as text. Nothing you paste is ever added to the page, so it can’t run.
- Decoding understands numeric entities and a common set of named ones. Unknown names are left exactly as typed.
- Escaping the characters &, <, >, double quotes and single quotes helps when placing text inside HTML, but it is not a substitute for a full security review of your site.
Related tools
- URL Encoder & Decoder – Percent-encode or decode text for use in URLs.
- Base64 Encoder & Decoder – Encode text to Base64 or decode it back, including emoji and non-English text.
- Unix Timestamp Converter – Convert Unix seconds or milliseconds to dates, and dates back to timestamps.
- HTTP Status Code Reference – Look up what any HTTP status code means.
- JWT Decoder – Read a JWT’s header and payload. Decoding only: it does not verify signatures.