LocalFirstTools.com — data tools that never leave your device
No upload — everything runs on your device

HTML Entity Encode / Decode

Escape text for HTML and decode entities back to text. Nothing is uploaded.

The HTML Entity tool always escapes the five HTML-critical characters — ampersand, angle brackets, double and single quotes — and can convert every character above code point 127 to a hex entity; decoding uses the browser's own DOMParser.

Converted locally — nothing leaves this tab

What does the HTML Entities do?

Characters like <, > and & have special meaning in HTML, so literal text must be escaped as entities (&lt;, &gt;, &amp;) before it is placed in markup. This tool escapes text for HTML and decodes entities — named like &eacute; or numeric like &#233; — back into readable text.

How does the HTML Entities work?

Encoding always escapes the five HTML-critical characters — ampersand, angle brackets, double and single quotes — and, with the All non-ASCII toggle, also converts every character above code point 127 to a hexadecimal &#x…; reference. Decoding hands the string to your browser's own DOMParser and reads back the text content, so every entity the browser knows is handled. Both directions run in this tab.

Does this upload my data?

No. This page never sends your input to a server — formatting, decoding and hashing all run in this tab, on this device.How that works.

Frequently asked questions

When do I need the “All non-ASCII” toggle?

When the output must survive a non-UTF-8 pipeline — legacy email templates, ISO-8859-1 pages, systems that mangle multibyte characters. On a modern UTF-8 page you only need the five critical characters escaped.

Why is the apostrophe encoded as &#39; instead of &apos;?

&apos; is not defined in HTML 4, so old parsers do not understand it. The numeric form &#39; works everywhere, which is why it is the safer default.

Is escaping enough to prevent XSS?

Escaping these characters is the right move for text placed in element content or quoted attributes. Other contexts — URLs, inline scripts, CSS, unquoted attributes — need their own context-specific encoding, not HTML entities.

Does decoding execute any HTML?

No. DOMParser parses the string into an inert document that is never attached to the page — scripts do not run and images do not load. Only the resulting plain text is read out.

Related tools

Browse allencoding toolsor thefull tool directory.