Like ToolFern? Prefer us as your source on Google →

HTML Entity Encode & Decode

Convert special characters to HTML entities and back. Pick named, decimal, or hexadecimal output for encoding, decoding reads all three automatically.

Style only affects encoding, decoding reads all three automatically.

What are HTML entities?

Certain characters have special meaning in HTML, the ampersand, the less-than and greater-than signs, and quotes. To show them as literal text (instead of letting the browser treat them as markup), you replace them with entities like &, < and >. This tool does that conversion both ways.

How to use it

  1. Encode: pick a style (named, decimal, or hex), paste text or code, and get a version safe to drop into HTML.
  2. Decode: paste entity-escaped text, named or numeric, to turn it back into normal characters.
  3. Copy the result with one click.

Encoding styles

The style you pick only changes how Encode writes its output:

Decode does not need a style set, it reads named, decimal, and hex references in the same input and turns every one it recognizes back into a plain character.

What's covered by named entities

Named encoding covers a practical, documented set rather than the full HTML5 list of over 2,000 entity names. Specifically: the five characters HTML itself needs escaped (&, <, >, ", '), the accented Latin letters used in French, Spanish, German and similar languages (é, ñ, ü, ç and the rest of that Latin-1 block, upper and lowercase), common currency signs (€, £, ¥, ¢), and everyday symbols such as ©, ®, ™,  , —, –, … and curly quotes.

Anything outside that set (Greek letters, emoji, math symbols, CJK text) still encodes correctly, it just comes out as a numeric reference instead of a name, which every browser and HTML parser reads just as well.

Frequently asked questions

Does it handle numeric entities?

Yes, both named and numeric (decimal and hexadecimal) entities are supported.

What named entities does the encoder support?

A practical subset covering the five HTML-unsafe characters, accented Latin letters (Latin-1), common currency signs, and everyday symbols like copyright, trademark, and em dash. Anything outside that set still encodes correctly, it falls back to a numeric reference automatically.

Related: URL encode/decode · Base64

Found this useful? Share it