HTML Entity Encoder / Decoder
Escape text as HTML entities such as & and <, or decode named and numeric entities such as © and © back to characters.
HTML Entity Encoder / Decoder
Escape text as HTML entities such as & and <, or decode named and numeric entities back to characters.
Your text is processed in your browser and is not uploaded.
How it works
- Choose Encode or Decode, then type or paste your text. The result updates as you type.
- When encoding, optionally also encode every non-ASCII character as a numeric entity.
- Swap moves the result into the input and flips the mode.
Counting rules
- Encoding always escapes & < > " and ', written as & < > " and '.
- “Also encode non-ASCII characters” writes each character above U+007E as a decimal entity, so an emoji is one entity.
- Decoding handles numeric entities (© and ©) and the 252 HTML 4 named entities plus '. Newer HTML5-only names are left unchanged.
- Only complete entities ending in a semicolon are decoded; unknown names and invalid numbers are left as typed.
- Decoding is a single pass: “&lt;” becomes “<”, not “<”.
- Your text is processed in your browser and is not uploaded.
Worked example: “<a href="x">Tom & Jerry</a>” encodes to “<a href="x">Tom & Jerry</a>”, and decoding that gives “<a href="x">Tom & Jerry</a>” back.