HTML Entity Encoder / Decoder
The HTML Entity Encoder / Decoder converts special characters to their HTML entity equivalents (for example & becomes & and < becomes <) and reverses the process instantly. Choose between encoding only the unsafe characters or every non-ASCII character, with named or numeric entities. Built for developers, content editors and technical writers who need to embed code snippets, user content or special symbols in HTML without breaking the markup.
Input
Needed inside attribute values. Text between tags only needs & < >.
Names come from the HTML 4 set every browser and email client knows; other characters are numeric.
<p class="note">Café & crème brûlée: "5 > 3" isn't news. © 2026, €12 → 😀</p>How to use
- Paste your text or HTML and choose Encode or Decode.
- When encoding, choose which characters to convert (only & < > " ', or every non-ASCII character too) and whether to use named or numeric entities.
- The result updates as you type, with character and entity counts.
- Copy the output, or select Use output as input to reverse it or to decode text that was encoded twice.
Why use this tool?
Frequently asked questions
What is the HTML Entity Encoder / Decoder?
A browser-based tool that converts special characters like <, >, & and " into their safe HTML entity forms (<, >, &, ") and reverses the process, decoding entity strings back into readable text.
When should I encode vs. decode HTML entities?
Encode when you need to display raw code or user-submitted text inside HTML, for example to show a <script> tag literally on a page without it running. Decode when an API response or CMS export contains escaped entities (like &amp; or ') and you need the readable version. Always encode output; never assume input is already safe.
Should I use named or numeric entities?
Named entities like é are easier to read; numeric ones like é work for every Unicode character, emoji included. With named entities on, this tool uses names from the HTML 4 set that every browser and email client understands and falls back to numeric references for everything else.
Is it free?
Yes, the HTML Entity Encoder / Decoder is free with no signup required. It runs entirely in your browser, so nothing you paste is uploaded. Built by the Canvas Builder team.
Stop tweaking snippets. Build the whole site
This tool fixes one piece. Canvas Builder builds the entire page from a single prompt: sections, copy, styling, and responsive layout. You own the code.