sitekits.dev
press ⌘K to switch tools
ENCODE & DECODE

HTML Entity Encoder & Decoder

Encode and decode HTML entities.

local
html-encode
§01 ABOUT THIS TOOL

Overview

HTML entities let you display characters that would otherwise be parsed as markup. Encoding here escapes the five significant characters (&, <, >, ", ') — the minimum needed to safely embed arbitrary text in HTML content or attribute values. Decoding goes the other way and resolves any entity the browser knows.

How to use

  1. Pick Encode or Decode with the mode tabs.
  2. Type or paste into the input field (labeled Text in encode mode, HTML in decode mode).
  3. Read or copy the converted output from the Result field — it updates as you type.

Examples

  • Encode: <a href="x">Tom & Jerry</a>&lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;
  • Decode: &copy; 2026 &lt;dev&gt;© 2026 <dev>
  • Decode (hex numeric): &#x3042;

Notes

Decoding extracts text content via DOMParser, so if the input contains real (unescaped) HTML tags, the tags themselves are dropped and only their text remains. Encoding output is safe for both element content and quoted attribute values, since both quote styles are escaped.

FAQ
Is my input sent to a server?
No. Encoding is a simple character replacement and decoding uses the browser's built-in DOMParser. Everything runs locally in your browser — nothing is uploaded.
Which characters does encoding escape?
Exactly the five HTML-significant characters: & becomes &amp;, < becomes &lt;, > becomes &gt;, double quote becomes &quot;, and single quote becomes &#39;. All other characters pass through unchanged.
Can decoding handle named entities like &copy; or numeric ones like &#x3042;?
Yes. Decoding parses the input with DOMParser, so every entity the browser understands — named, decimal, and hexadecimal — is resolved, not just the five that encoding produces.