tooldura

All tools

HTML Entity Encoder/Decoder

Escape text into HTML entities, or decode entities back into characters

Direction
Characters to Encode

Escapes & < > " and ', the five characters that change how a browser parses the page. Everything else is left as you typed it.

Format

Uses the HTML name where one exists (&eacute;) and a number for everything else, including emoji, which have no names.

About HTML Entity Encoder/Decoder

The HTML Entity Encoder escapes text so a browser prints it instead of parsing it, and decodes entities back into the characters they stand for. You choose how far the escaping goes: just the five characters that change how a page parses, everything outside ASCII as well, or all punctuation on top of that. Named references are used where HTML defines one and numbers everywhere else, including emoji, which have no names. Decoding handles named, decimal and hex references, with or without the closing semicolon, and leaves anything that only looks like an entity untouched. Underneath the result you get a table of every entity involved, with its character and code point.

FreeNo paywalls or tiers
No SignupNothing to create
InstantNo setup, no install
Any DeviceMobile, tablet, desktop

The guide behind this tool

HTML Entities: Five Characters, and Why Escaping Depends on Context

Only five characters truly need escaping, and doing it is not enough on its own. Where each context needs its own rule, and how double encoding announces itself.

8 min read

How to use HTML Entity Encoder/Decoder

  1. 1

    Pick Encode to escape text, or Decode to turn entities back into characters.

  2. 2

    When encoding, choose how much to escape and whether you want named entities or numbers.

  3. 3

    Paste your text or your encoded HTML into the input box.

  4. 4

    Copy the result, and check the table underneath to see exactly which characters were involved.

Frequently Asked Questions

Five: & < > " and '. The ampersand and the angle brackets change how the parser reads the document, and the two quote marks end an attribute value early. Everything else is escaped for other reasons, such as surviving a file served with the wrong charset, and never for safety.