HTML Entity Encoder / Decoder
Convert special characters to HTML entities and back.
About HTML Entity Encoder / Decoder
This free tool converts special characters like &, <, >, ", and 'into their corresponding HTML entities, and decodes entities back into readable characters. It also handles common typographic entities like em dashes, curly quotes, and ellipses. All processing runs locally in your browser — no data is sent to any server.
How to Use
- Enter text containing special characters or HTML entities in the input area.
- Click Encode to convert special characters to HTML entities, or Decode to convert entities back to characters.
- View the result in the output area along with the count of conversions made.
- Click Copy to copy the output to your clipboard.
Frequently Asked Questions
What are HTML entities?
HTML entities are special codes that represent characters which have a reserved meaning in HTML. For example, < represents the less-than sign < so the browser does not interpret it as an HTML tag.
Why should I encode HTML entities?
Encoding prevents browsers from misinterpreting special characters as HTML markup. This is essential to avoid broken layouts and to protect against cross-site scripting (XSS) attacks when displaying user-generated content.
Which characters are encoded?
The five core characters are: & (ampersand), < (less than), > (greater than), " (double quote), and ' (single quote/apostrophe). This tool also encodes common typographic characters like em dashes, curly quotes, and ellipses.
Is my data safe?
Yes. All encoding and decoding is performed entirely in your browser using JavaScript. No data is sent to any external server.