Skip to content
⌁DevKit Labs

HTML Entity Encoder & Decoder

Encode text to HTML entities or decode them back — including named and numeric entities, 100% in your browser.

Text
HTML entities

About HTML Entity Encoder & Decoder

Switch between Encode and Decode to convert instantly. Encoding always escapes the characters that matter for HTML — &, <, >, " and ' — and an option escapes every non-ASCII character as a numeric entity too. Decoding resolves both named entities (like &amp; and &copy;) and numeric ones (&#169; or &#xA9;).

Decoding uses the browser's own HTML parser, so the full set of named entities is supported, while tags are kept as literal text and nothing is executed. Everything runs locally; your text is never uploaded.

How to use HTML Entities

  1. Choose encode or decode and enter the text. Enable non-ASCII escaping only when your output format requires it.
  2. Review the result in the intended HTML context before copying it into a template.

Limitations and common mistakes

Escaping text content and securing an attribute, URL, script or style context are different tasks. Entity encoding is not a general-purpose HTML sanitizer.

Double encoding can turn an existing entity into visible text. Keep track of whether the input is raw text or already escaped markup.

The tool processes its input locally on your device. Read our privacy policy for analytics, storage and network details.

Escape HTML-special characters

Input
<a href="x">Tom & Jerry</a>
Output
&lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;

Decode reverses it, and “Escape all non-ASCII” also encodes accents and emoji.

Frequently asked questions

Which characters get encoded?

Always &, <, >, double and single quotes. With “Escape all non-ASCII” on, every character above ASCII (accents, symbols, emoji) is also encoded as a numeric entity.

Does decoding support named entities?

Yes. Decoding uses the browser's HTML parser, so named entities like &copy; and &mdash; and numeric ones like &#8212; all resolve correctly.

Is it safe to decode untrusted HTML here?

Decoding resolves character references only; tags are treated as literal text and no scripts run, and nothing leaves your browser.

Is my data uploaded anywhere?

No. All encoding and decoding happen locally in your browser.

For related tasks, explore URL Encode / Decode and Base64 Encode / Decode. Their guides explain the different inputs, assumptions and output formats.

Related tools

References