HTML Entity Encode/Decode

Encode and decode HTML entities — named, numeric, and hex.

100% Private Instant Free Forever
Input
Output

What are HTML entities?

HTML entities are special character sequences that represent characters that would otherwise be interpreted by the HTML parser (like <, >, &) or characters that are inconvenient to type (like © or non-Latin letters). They come in three flavours: named (&amp;), decimal numeric (&#38;), and hexadecimal numeric (&#x26;).

What this tool does

  • Encode — escape <, >, &, ", and ' always, with optional encoding of every non-ASCII character.
  • Decode — turn entities back into raw characters, handling named, decimal, and hex forms.
  • Auto — detect which direction makes sense based on the input.
  • Named vs numeric — choose between named entities (more readable) and numeric (always portable).

Tips

  • If your text will be inserted as an HTML attribute, also encode the surrounding quote character.
  • For emoji and other characters above the BMP, numeric entities use the code point (e.g. &#x1F600; for 😀).
  • Decoder uses a safe parser — no scripts are executed even if the input contains malicious markup.

Encoding and decoding both happen locally in your browser — your text never leaves your machine.