HTML entity encoder and decoder

Encode HTML characters and decode numeric and named references. Results remain text and never execute HTML.

Your inputs stay herePUFFINMINT

Set your data

Set your data

At most 100,000 characters. Decodes one layer and returns text; it does not sanitize HTML.

Result

The result updates as you type.

The values you enter stay on this page. Reloading or closing it clears them.

We count which tools are used most, without including entered values or file contents in the statistics. Privacy

How to use it

Encode text once at the point where it is inserted. To display a string containing tags, encode the delimiters too. If a template engine already escapes the text, another encoding pass may show entity names to the reader.

  1. “Reverse conversion” sends the result through the opposite direction if it fits the input limit. The result stays plain text and any tags are inert. Open Compare versions to read the original and the result as plain text.
Example inputs
InputResult
A & BA & B

Method and limits

Decodes one layer only. Entities do not sanitize HTML or protect JavaScript, CSS or URL contexts.

Example

Usage scenario

Input
A & B
Result
A & B

The string A & B contains an ampersand. Encoding produces A & B. The sequence < needs two decoding passes to become a less-than sign: this tool performs one pass and returns <.

What are the limits of this tool?

At most 100,000 characters. Decodes one layer and returns text; it does not sanitize HTML.

Inputs and results are processed in your browser and are not sent to the server. Aggregate statistics, when enabled, record only the tool and outcome, without the content.

Sources

Frequently asked questions

Why does < become <?

Encoding also escapes the ampersand in an existing reference. Decoding removes one layer at a time: &amp;lt; becomes &lt;, then &lt; becomes <.

PRACTICAL GUIDES

HTML special characters: when to escape text

Separate text from markup, avoid double encoding and understand why HTML entities cannot replace sanitization.

Follow the steps

Favorites