HTML Entity Encoder / Decoder
Encode text to HTML entities or decode entities back to characters.
Last updated:
Encode and decode HTML entities
This HTML entity encoder and decoder converts special characters into entities such as & and <, or turns entities back into normal characters. The result updates as you type.
How to use it
- Choose Encode → Entities or Decode ← Entities.
- Paste or type your text into the input box. It starts with a short HTML example.
- Read the result in the output box.
- Click Copy to copy it.
How it works
When encoding, each character is checked against a built-in list of named entities, such as ©, €, —, → and some Greek letters and math symbols. The list covers 60-plus characters, including the five that matter most in HTML: &, <, >, " and '. Any other character above code 127 becomes a numeric entity like €. Plain ASCII letters and digits stay unchanged.
When decoding, the tool reads named entities from the same list, plus any decimal (©) or hex (©) entity.
Examples
| Character | Entity |
|---|---|
| & | & |
| < and > | < and > |
| " | " |
| © | © |
| Any other non-ASCII character | Numeric, such as é for é |
Assumptions and limits
- Decoding only knows the named entities in the tool's list. Other names, such as
é, are left as they are, though the numeric form works. - Decoding runs once.
&#60;becomes<and is not decoded again. - Invalid numbers, such as zero or values above the Unicode range, are left unchanged.
- Encoding changes every matching character in your text, including the tags in HTML you paste in.
Frequently asked questions
Why does encoding turn my tags into text?
The tool encodes every character it knows, so <h1> becomes <h1>. That is what you want when showing code on a web page.
Why was an entity not decoded?
It is probably a named entity outside the built-in list. Use its numeric form, like é, which the decoder always handles.
Is a non-breaking space handled?
Yes. A non-breaking space is encoded as and decoded back from it.
Related Developer Tools
Browse all tools from the same category.
Domain Authority Checker
Check Moz authority, page authority, spam score, and backlink metrics
Open toolSEO Audit Tool
Audit a website URL for technical SEO, metadata, headings, broken internal links, hreflang, canonical and X-Robots-Tag checks, with report exports
Open toolShowing 1-2 of 49