HTML entity encoder and decoder

Convert HTML special characters to entities and back.

Your files are processed here, on your device

We do not send your file or text contents to a processing server. No account is needed and there is no daily operation quota. Individual tools have size limits to protect your device’s memory.

A connection is needed to load the site and its resources. Hosting may receive technical visit data. Favorites store only tool identifiers in this browser.

How we handle your data →

How to use this tool

  1. Paste characters or entities to convert.
  2. Choose encoding or decoding and run one pass.
  3. Inspect the result as text; tags are not executed.

An example you can verify

Represent reserved characters as text inside an HTML example.

Example input

<b>&

SettingsOperation: Encode.

Expected result

&lt;b&gt;&amp;

The tool displays text rather than executing pasted tags. Decoding applies one pass.

HTML entity encoder and decoder: uses and practical guidance

HTML entities represent characters with a role in markup. Encoding changes signs such as less than, greater than, ampersand and quotation marks into references that can appear as text in a suitable context. It helps prepare a code example or inspect a string received from another system. Decoding recovers characters from recognized entities, but does not turn the supplied content into an executable page inside this tool. Output remains text for inspection.

Check whether encoding or decoding is needed first. Encoding a fragment already containing entities can add another representation layer around its ampersands. Decoding performs one pass: a nested representation may retain another layer in the output. This makes the actual contents of each level visible rather than repeatedly interpreting a string until it happens to resemble markup. Know the representation expected by the destination before applying another transformation.

The tool accepts semicolon terminated entities, including named references and numeric Unicode values. Unknown references remain unchanged. Test special symbols from a real sample to confirm the expected characters appear. HTML encoding differs from URL encoding and Base64; each follows separate rules and is appropriate only when the receiving system expects that representation. Similar looking escaped strings cannot be substituted freely between those contexts.

Escaping a string here does not guarantee every later insertion is safe. HTML text, attributes, JavaScript and URLs have different contexts. In an application, use appropriate template mechanisms and avoid uncontrolled insertion of data as executable markup. The converter displays its result as text. Retain the source and inspect how the copy is used in its final system, especially when characters also serve as structural separators or quotation boundaries there.

A practical check before using the result

For a visible markup example, use a short tag and confirm encoded output retains its textual meaning. Include an ampersand already belonging to an entity to observe another encoding layer. After decoding, distinguish a recovered character from an instruction to execute it: output here remains text. Test the specific insertion context when placing the copy in a page. An entity appropriate for HTML text does not automatically handle a value inside JavaScript or a URL. Keep the sample and destination context so another person can repeat the check and understand the representation chosen. Context specific testing is more informative than simply observing that the converter returned a string without error.

Settings and limits

Encoding replaces &, <, > and quotation marks. Decoding accepts semicolon-terminated entities, including HTML names and decimal or hexadecimal Unicode codes. The result is always displayed as text.

Frequently asked questions

Does pasted HTML execute?

No. Content is not inserted as executable HTML. Unknown entities are preserved and decoding makes a single pass.

Guides