Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Encoding & Decoding

HTML Entity Converter

Two-way HTML entity conversion. Encode: turn & < > " ä into &amp; &lt; &gt; &quot; &auml; so text is safe to drop into HTML without breaking markup or enabling script injection. Decode: turn &lt;b&gt;, &eacute;, &copy;, &#169; and named entities back into real characters. Runs entirely on your device.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Encode and decode, two directions

This tool converts text to HTML entities or back again. Encoding turns the characters that break HTML markup — &, <, >, and the quotes — into their named entities, so pasted text cannot close a tag or inject a script. Decoding takes &amp;, &lt;b&gt;, &eacute;, &copy; and numeric forms like &#169; or &#x00A9; back to real characters. The mode is usually detected automatically from which kind of string you pasted.

When each direction helps

Encode before you drop user-supplied or copied text into a page, a template or an email where it would otherwise be parsed as markup. Decode when you received an entity-laden string — an RSS feed, an old export, a caption with &mdash; or &nbsp; — and you want the plain text it represents. The encodeAll switch goes further and also turns every printable non-ASCII character into a numeric entity, which is handy for an ASCII-only target charset.

How auto-detect decides

If the text contains entity-looking fragments such as &amp;, &#65; or &eacute; it decodes; if it contains raw <, > or & it encodes. A string that has both kinds is ambiguous, so the mode option lets you force the direction rather than guess. Unknown entity names and malformed fragments are left untouched rather than destroyed, so decoding is safe on text you are not sure about.

Scope of the tables

Encoding covers the five characters that make HTML unsafe plus apostrophes, and optionally all printable non-ASCII as numeric entities. Decoding understands the full HTML4 named set plus HTML5 entities and both decimal and hexadecimal numeric forms, so the common cases and the obscure ones are both handled in this tab with no network lookup.

Nothing is uploaded

Both directions run entirely on your device. The text you convert never leaves this tab, so you can safely encode a snippet you do not want a hosted converter to see, and the tool works offline.

Questions

When is auto-detect used?

If the text contains &-entities such as &amp;, &#65; or &eacute;, it decodes; if it contains raw <, > or & it encodes. Force a direction with the mode option when a string has both.

What does Encode do exactly?

Replaces & < > " and ' with their named entities, and apostrophes/quotes as configured. With "Encode all printable non-ASCII" it also turns é, ≤ and similar into numeric entities — handy when the target charset is ASCII-only.

Which entities can be decoded?

All named HTML4 entities (&amp;, &copy;, &eacute;, &nbsp; and the rest), numeric decimal and hexadecimal forms (&#169;, &#x00A9;), and any HTML5 entity. Unknown fragments are left untouched.

Is the result valid to paste anywhere?

The encode output is valid HTML text. The decode output is always plain text. Both are safe to copy into any editor.

See category