<>

HTML Entity Encoder/Decoder

Encode special characters to HTML entities and decode them back, including numeric entities.

Encodes & < > " ' to named entities and back. Numeric entities like { and { are also decoded.

Frequently Asked Questions

When should I encode HTML entities?

Encode characters when displaying user input as HTML to prevent XSS and layout breakage. Encode the ampersand, angle brackets, and quotes so they render as text instead of being interpreted as markup.

What entities does this handle?

Encoding converts the ampersand, less-than, greater-than, double quote, and apostrophe into their named entities. Decoding handles named entities plus numeric entities like &#123; and &#x7B;.

Does it encode all special characters?

It encodes the five characters that matter for HTML safety. Other Unicode characters are left as-is since modern HTML is UTF-8 and does not require encoding them.

Is my text sent anywhere?

No. Encoding and decoding happen entirely in your browser.

Related Tools