🔒 100% client-side — nothing uploaded
HTML Entity Encoder/Decoder
Encode text to HTML entities or decode entities back to characters. Named, numeric, and hex — with a live preview and searchable reference table.
Input text
HTML entities
Live preview
How the browser renders the output
Output preview will appear here…
HTML Entity Reference
| Char | Named | Dec | Hex | Description |
|---|
No entities found.
Frequently Asked Questions
HTML entities are special text sequences representing characters that have special meaning in HTML or can't be typed directly. The less-than sign
< must be written as < to prevent browsers interpreting it as a tag. Entities can be named (&), decimal (&), or hex (&) — all produce the same character.Always encode when displaying user-generated content containing
<, >, &, or quotes in HTML. Skipping this creates XSS (Cross-Site Scripting) vulnerabilities. The five mandatory encodes are: &→&, <→<, >→>, "→", '→'.Named entities use aliases:
& for &, © for ©. Numeric entities use the Unicode codepoint: & (decimal) or & (hex) for &. Named entities only cover a limited set; numeric entities work for any Unicode character.Classic trick: create a
textarea, set innerHTML to the encoded string, then read .value — the browser decodes automatically. function decodeEntities(s) { var t = document.createElement('textarea'); t.innerHTML = s; return t.value; } This tool uses the same technique.Not necessarily. If your HTML document declares
<meta charset="UTF-8"> and is served with Content-Type: text/html; charset=UTF-8, UTF-8 characters (like é, ñ, 中文) are fine as-is. You only need to encode characters with HTML meaning (< > & " '). The "Encode all non-ASCII" toggle is useful for legacy systems that can't handle multibyte characters.Related Tools
SEO Tool
URL Slug Generator
Convert titles to SEO-friendly slugs
Dev Tool
JSON Formatter
Format & validate JSON instantly
Dev Tool
Hash Generator
MD5, SHA-1, SHA-256, SHA-512
Dev Tool
Regex Tester
Test regular expressions live
Dev Tool
CSS Minifier
Minify CSS, JS & HTML
Text Tool
Case Converter
Title case, camelCase, snake_case