HTML Entity Encoder/Decoder
The HTML entity encoder/decoder converts special characters into HTML entities and turns entity codes back into plain text. Characters like <, >, and & carry special meaning in markup, so they must be escaped to display correctly instead of breaking your page.
Paste any text or a string full of entity references and the result updates instantly. It is built for web developers escaping content for safe output, writers inserting symbols that aren't on the keyboard, and anyone who needs to read what a block of ©-style codes actually says.
How to Use
Pick a mode
Choose Encode to turn text into HTML entities, or Decode to turn entities back into readable text. Encode is active by default.
Choose a format
While encoding, select Named for readable codes like &, or Decimal (&) and Hex (&) for any Unicode character.
Type or paste your input
Enter text in the left panel. The converted result appears in the right panel in real time as you type — no convert button to press.
Copy or swap
Use Copy Result to grab the output, or Swap to feed the result back in and flip the mode for an instant round trip.
Features
Encode and Decode
Convert text to HTML entities or decode entities back to readable text with a single mode toggle.
Three Encoding Formats
Output as Named (&), Decimal (&), or Hexadecimal (&) entities.
Real-Time Conversion
Results update automatically as you type, with debouncing that keeps it responsive on large texts.
Named Fallback
In Named mode, characters with no named entity automatically fall back to decimal numeric codes.
Swap Function
Send the output back to the input and toggle the mode for effortless round-trip encoding and decoding.
One-Click Copy
Copy the full result to your clipboard instantly, then clear both panels to start fresh.
Entity Reference Table
Browse entities across six categories: Common, Symbols, Math, Arrows, Currency, and Greek.
Searchable & Click-to-Copy
Find any entity by character, name, code, or description, then click a row to copy it directly.
Frequently Asked Questions
What is an HTML entity?
An HTML entity is a code that represents a character with special meaning in HTML, or one that is hard to type. For example, the less-than sign is written as < so the browser shows < instead of treating it as the start of a tag. Entities can be named (©), decimal (©), or hexadecimal (©).
How do I encode special characters to HTML entities?
Keep Encode mode selected, pick a format (Named, Decimal, or Hex), and type or paste your text on the left. The encoded entities appear on the right instantly. Click Copy Result to copy the escaped output.
How do I decode HTML entities back to text?
Switch to Decode mode and paste your entities into the left panel. The decoder reads named, decimal, and hex entities all at once, so a mixed string like <p>© & ™ correctly returns <p>© & ™.
What is the difference between Named, Decimal, and Hex formats?
Named entities use readable codes like © for ©. Decimal uses the character's Unicode number in base 10 (©), and Hex uses base 16 (©). All three render the same in a browser — named is easier to read, while numeric formats can represent any Unicode character.
Why use HTML entities for <, >, and &?
Encoding stops browsers from misreading characters as markup. A raw < in your content could break the layout if it isn't escaped to <, and escaping user-supplied text is a core defense against cross-site scripting (XSS). Entities also let you display symbols that aren't on a standard keyboard.
What happens to characters without a named entity?
In Named format, characters that have no named entity — such as accented letters like ñ or ü — automatically fall back to decimal numeric encoding. In Decimal or Hex mode, all non-ASCII and HTML-special characters are encoded numerically.
Is this tool free and browser-only?
Yes. The tool is free to use and runs entirely in your browser, so your text never leaves your device. There is no hard size limit — performance depends only on your own hardware, and it handles typical snippets and documents without issue.
No comments yet. Be the first to comment!