HTML entity encoder / decoder
Runs entirely in your browser. Your files and data never leave your device.
About this tool
HTML entities represent characters that would otherwise be read as markup, like <, >, and &, along with symbols outside plain ASCII, such as accented letters, currency signs, and curly quotes. This tool encodes text into named and numeric entities, and decodes entities back into plain text. It handles named references like & and ©, decimal references like é, and hexadecimal references like é.
What does it actually convert?
Encoding turns the five characters that are unsafe inside HTML markup, &, <, >, ", and ', into their named entities: &, <, >, ", and '. Turn on the non-ASCII option and it also converts every character outside plain ASCII into a decimal numeric entity, which is useful when you need output that’s safe to paste into an older system that doesn’t handle UTF-8 cleanly.
Decoding covers the entities people actually run into day to day: &, <, ©, —, accented letters like é, and roughly seventy other named references, plus any decimal (é) or hexadecimal (é) numeric entity. The HTML5 spec defines well over two thousand named entities, most of them obscure mathematical or historical symbols, so this tool sticks to the common set rather than trying to cover every one. Numeric entities work for any character regardless of name, so nothing is actually out of reach, it just won’t come back with a name attached.
Are my snippets sent anywhere?
No. Everything runs in your browser using plain string processing, no network request is made at any point. That makes it fine to use on snippets containing private data, internal URLs, or unpublished content, since none of it leaves your machine.
When would I need this?
The usual case is embedding user-submitted text inside HTML and needing to escape it safely, so a stray < in someone’s comment doesn’t get parsed as a tag. It’s also handy when a page is rendering & instead of & and you’re trying to figure out where the double-encoding crept in, or when you’re cleaning up text copied from a CMS or word processor that’s full of curly quotes and dashes written out as numeric entities. See MDN’s guide to entity references and the WHATWG table of named character references for the full list of defined entities.