OOnDevice

HTML Entity Encoder/Decoder

Encode special characters to HTML entities or decode them back — right in your browser. Handles &, <, >, ", and '.

Works offlineNothing uploaded

How to use it

1

Paste your text or HTML

Enter text with special characters or HTML entities.

2

Choose encode or decode

Select whether to encode characters to HTML entities or decode them back.

3

Copy the result

Click copy to use the encoded or decoded text.

When to use HTML Entity Encoder/Decoder

Your XML product feed is failing the validator because a vendor's product name contains an ampersand — `AT&T` — and your templating layer is emitting it raw instead of as `&amp;`. Or you're debugging an email template where Word-pasted smart quotes are rendering as `&ldquo;` in the subject line. Paste the text here, hit encode, and every `&`, `<`, `>`, `"`, and `'` comes back as its correct HTML entity. Decode goes the other way: paste entity-stuffed HTML and get clean, readable text in one click. Useful for sanitizing user-generated content before injecting it into a DOM, prepping text for XML sitemaps, or reading entity-encoded strings in a legacy CMS export. Runs in the browser; nothing is sent anywhere.

  • Encode user-generated content before inserting it into the DOM
  • Fix ampersands breaking an XML product feed validation
  • Decode entity-stuffed strings from a legacy CMS data export

About this tool

HTML entities trip up templates constantly: an ampersand in a product name breaks XML feeds, angle brackets in user input escape into tag soup, and smart quotes from Word pastes render as `&ldquo;`. Paste text to encode special characters to their HTML entity equivalents — `&`, `<`, `>`, `"`, `'` and the full set — or paste entity-encoded HTML to decode it back to readable text. Useful for sanitizing user-generated content, debugging broken email templates, or prepping text for embedding in XML sitemaps. No data leaves your browser. Encode or decode, copy the result, done.

Frequently asked

What are HTML entities?
HTML entities are special codes like &amp; &lt; &gt; that represent characters which have special meaning in HTML, preventing them from being interpreted as markup.
When should I encode HTML entities?
Encode HTML entities when displaying user-generated content in a web page to prevent XSS attacks, or when you need to show HTML tags as visible text.
Is this HTML encoder private? Does it send my data to a server?
No. Entity substitution runs through a JavaScript lookup table in this tab — your markup and user-generated strings are never posted anywhere, and the tool handles encoding offline.