PB
Available
code
lock Free · Private · In-Browser

HTML Entity Encoder & Decoder

Convert HTML-sensitive characters into safe entities, or decode existing entities back into readable text.

Escape snippets before placing them in HTML

When you want text to display as characters rather than be interpreted as markup, you need HTML entities. Show a code example containing <div>, put an ampersand in a title, or drop a snippet into a CMS field that renders HTML, and the raw characters will break the page or vanish. This tool escapes the five characters that cause trouble — & < > " ' — into their safe entity equivalents so your text renders exactly as written.

It works both ways. Decoding uses the browser's own parser, so it correctly turns named and numeric entities — &amp;, &#39;, and the rest — back into plain, readable characters, which is handy when you've copied over-escaped text from an export or template.

Private and instant

Both directions run entirely in your browser, so even confidential snippets never leave your device.

Frequently Asked Questions

What characters get encoded?

The tool escapes &, <, >, double quotes, and single quotes, the characters most likely to break HTML.

Can this decode named entities?

Yes. Decoding uses the browser parser, so common named and numeric entities are handled.

Is this safe for confidential snippets?

Yes. The conversion runs locally in your browser.

Take it further
Developer Tools

More lightweight utilities for developers, designers, and technical teams.

Learn More arrow_forward