Encode special characters into HTML entities, or decode HTML entities (named, decimal or hex) back into plain text.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
Encoding converts characters with special meaning in HTML, like &, <, >, " and ', into their entity equivalents (&, <, >, ", '), so they display as literal text instead of being interpreted as markup. Decoding reverses this, converting named entities, decimal entities (like ©), and hex entities (like ©) back into their original characters.
Displaying user-generated or code-like text safely inside an HTML page requires encoding special characters first, otherwise a stray '<' could be misinterpreted as the start of a tag. This is a common step when embedding code snippets in a web page or preparing text for an XML/HTML context.
Encoding "<b>Bold</b> & 'quoted'" gives '<b>Bold</b> & 'quoted'', every special character (<, >, &, ') is swapped for its entity equivalent, so the browser displays it as literal text rather than interpreting '<b>' as an actual bold tag. Decoding a numeric entity like '© 2026' or its hex equivalent '© 2026' both correctly produce '© 2026'.
Forgetting to encode user-submitted text before displaying it inside HTML, an unencoded '<' or '&' in user input can be misinterpreted as markup, which is both a display bug and a potential security issue (cross-site scripting) if left unaddressed at the application level.
Assuming every named HTML entity is supported for decoding, this tool supports the most common ones (amp, lt, gt, quot, apos, nbsp) plus any numeric entity, but the full HTML5 spec defines hundreds of named entities, an unrecognized name is left unchanged rather than guessed at.
Double-encoding text that's already encoded, encoding '&' again produces '&amp;', since the & itself gets re-encoded, always check whether text is already in entity form before encoding it again.
Entirely in your browser, your text is never sent to or stored on our servers.
Common named entities (like & and <), decimal numeric entities (like ©), and hexadecimal numeric entities (like ©) are all supported.
Google AdSense Banner
This area will contain advertisements after approval.