HTML Entity Encoder and Decoder

Escape text for HTML, or turn entities back into characters.

Mode
Encode

Runs on your device. Nothing to upload.

Questions

Which characters need escaping in HTML?

Inside text and attribute values, the five that matter are &, <, >, " and '. “Only special characters” escapes just those, which is all a UTF-8 page needs. The other options also turn accented letters, emoji and symbols into numeric references, for files that must stay plain ASCII.

Which entities can be decoded?

All of them: the 2,000+ named references in the HTML standard (like &eacute; or &hearts;), decimal references (&#233;) and hexadecimal ones (&#xE9;). Decoding uses your browser’s own HTML parser, so results match what a browser shows. Tags in the text are left exactly as they are.

Is escaping enough to make user input safe?

For text placed between tags or inside a quoted attribute value, yes. It is not enough inside <script>, style, event handler attributes or URLs, which need their own escaping or, better, a templating system that escapes by context.

Is it free? Do I need an account?

It is free to use and there is nothing to sign up for. There are no watermarks and no daily limits.

Missing something, or not working as it should? Tell us