HTML Entity Encode/Decode

Encode special characters to HTML entities or decode them back.

What are HTML entities?

HTML entities are special codes used to represent characters that have special meaning in HTML, such as < (less than), > (greater than), and & (ampersand). They follow the format &name; or &#number; and ensure that these characters are displayed correctly in web pages rather than being interpreted as HTML markup.

How to use this tool

Enter text containing special characters and click 'Encode' to convert them to HTML entities, or paste HTML entity codes and click 'Decode' to convert them back to their original characters. Results can be copied with one click.

Common use cases

Sanitizing user input to prevent XSS attacks, displaying code snippets in HTML pages, encoding special characters in email templates, and fixing character encoding issues in web content.