Discover
Random

HTML Entity Encoder / Decoder

Encode text to HTML entities or decode them back — live, bidirectional, full Unicode.

Encode scope
Entity format
Plain text
HTML entities

HTML entity encoder decoder — free, safe, full Unicode

Working with HTML entities? Our free HTML Entity Encoder / Decoder converts both ways instantly. Paste text to turn special characters into safe HTML entities, or paste entities to decode them back to readable text—change either side and the result updates live. It handles full Unicode, so symbols, accents, and emoji convert correctly without breaking.

It covers the cases that matter: encode just the HTML-unsafe characters like <, >, &, and quotes, or encode everything non-ASCII for maximum safety, and decode named, decimal, and hex entities alike. Decoding is done safely, so pasted markup is never executed—just converted to plain text. A single click copies either side. Whether you're escaping content for a web page, fixing mojibake, or debugging encoded output, you'll get a clean, correct result. Simply paste your text or entities to convert instantly. No sign-up, no downloads, no limits—just accurate results, privately.

About the HTML Entity Encoder / Decoder

How It Works & Methodology

HTML entities are special codes used to represent characters that would otherwise be interpreted as HTML markup, or characters that are difficult to type directly. For example, < represents a literal less-than sign, & represents an ampersand, and &copy; represents the © symbol. Entities come in three forms: named (&amp;), decimal (&#38;), and hexadecimal (&#x26;).

The HTML Entity Encoder / Decoder converts both ways, live. Paste plain text and it instantly encodes the characters that need escaping. Paste a string of HTML entities and it decodes them back to readable text. No button presses needed — just type or paste and the result appears immediately.

Features

Two-way conversion

Edit the plain text side to encode, or the entities side to decode — whichever you type into updates the other instantly.

Named, decimal & hex

Choose your entity output format: named entities like &copy;, decimal like &#169;, or hex like &#xA9;. Decode handles all three automatically.

Encode scope options

Encode only the five HTML-unsafe characters (&, <, >, ", ') by default, or switch to encoding all non-ASCII characters for maximum compatibility.

Full Unicode support

Emoji, accented characters, CJK ideographs, and other non-Latin text all round-trip correctly — nothing is mangled or lost.

Safe decoding

Decoding uses a lookup table and String.fromCodePoint() — it never writes to innerHTML, so pasted markup is never rendered or executed.

Fully client-side

Everything runs in your browser. No data is sent to any server, so you can safely encode sensitive strings like tokens, content, or private text.

Authoritative Sources & Standards

  1. MDN Web Docs — Web APIs, Encoding & Data Formats Specification — Mozilla Developer Network (MDN)
  2. IETF RFC Standards Index (RFC 3986 URI, RFC 4648 Base64, RFC 7519 JWT, RFC 8259 JSON, RFC 9562 UUID) — Internet Engineering Task Force (IETF)

Frequently Asked Questions

How does the HTML entity tool work?

Paste text to encode special characters into HTML entities, or paste entities to decode them back to text. Change either field and the other updates instantly.

What is an HTML entity?

A way to represent characters that have special meaning in HTML (like <, >, and &) or that are hard to type, using codes such as &lt;, &amp;, or &#169;.

What types of entities can it decode?

Named entities (&amp;, &copy;, &nbsp;), decimal numeric entities (&#169;), and hexadecimal entities (&#xA9;).

Can I choose what gets encoded?

Yes. Encode just the HTML-unsafe characters by default (&, <, >, ", '), or switch to "All non-ASCII" to encode every character above ASCII 127 for maximum safety.

Does it handle emoji and accents?

Yes, full Unicode is supported, so accented letters, symbols, and emoji convert correctly in both directions.

Is decoding safe?

Yes. The tool decodes using a lookup table and String.fromCodePoint() — it never assigns to innerHTML or renders pasted markup as live HTML, so there is no risk of script execution.

Why escape HTML characters?

Escaping prevents characters from being interpreted as markup, which keeps content displaying correctly and helps avoid injection issues on web pages.

Embed HTML Entity Encoder / Decoder

Copy and paste this HTML snippet to embed this interactive calculator on your website or blog:

Discover more tools

Surprise me