Developer Tools

HTML Entity Encoder / Decoder

Encode special characters into HTML entities, or decode HTML entities back into readable text, instantly inside your browser.

Private by default Instant results No signup
HTML Entity Encoder / DecoderLive
Overview

What are HTML entities?

HTML entities are text sequences that represent characters with special meaning in HTML, such as &, <, >, ", and ' — as well as any character outside the basic ASCII set. Encoding replaces those characters with their entity equivalent so they render as literal text instead of being interpreted as markup; decoding reverses the process.

This tool encodes plain text into named entities (like &amp;) or numeric entities (like &#39;), and decodes any mix of named and numeric HTML entities back into plain, readable text.

Guide

How to use it

1Choose Encode or Decode
2Type or paste your text or entities
3Toggle numeric entities if you need ' instead of named entities
4Copy the result

How encoding and decoding work

Encoding scans the input character by character: the five characters HTML treats specially — & < > " ' — are always converted to their named entity, and when numeric mode is enabled every other non-ASCII or symbol character is converted to its &#codepoint; form instead. Decoding recognizes both named entities (&amp;, &nbsp;, and similar) and numeric entities in decimal or hexadecimal form, converting each back to its original character.

Why it helps

Features & benefits

Encode text to named or numeric HTML entities
Decode named and numeric entities back to text
Handles decimal and hexadecimal numeric entities
Live results as you type
100% private — nothing leaves the device

Why this runs entirely in your browser

Every conversion runs in JavaScript locally in the tab, which means it keeps working offline once the page has loaded and nothing typed here is ever sent to a server.

Common uses

Safely displaying user-submitted text inside an HTML page without it being interpreted as markup, preparing code snippets for a blog post, cleaning up copy-pasted text that arrived full of numeric entities, or decoding entity-encoded content pulled from an RSS feed or API.

Frequently asked questions

A few things people usually want to know before trusting the numbers.

Named entities use a readable name like &amp; for common characters, while numeric entities use the character's Unicode code point, like &#39;. Both render identically in a browser.

& < > " ' are always encoded since they have special meaning in HTML. Every other character is only encoded when numeric mode is turned on.

Yes. Decoding supports both decimal (&#39;) and hexadecimal (&#x27;) numeric entities, alongside common named entities.

Numeric entities cover any Unicode character, including symbols and accented letters that don't have a widely supported named entity.

No. All encoding and decoding happens locally in your browser. Nothing typed or pasted here is sent to a server, stored, or shared.