HTML Entity Encode / Decode
Encode text to safe HTML entities, or decode HTML entities back to text, instantly in your browser.
How to use the HTML Encode/Decode
- Choose Encode to escape text for HTML, or Decode to turn entities back into characters.
- Paste your text or HTML.
- Click Run and copy the result.
How the HTML Encode/Decode works
Some characters have special meaning in HTML: < and > start and end tags, & starts an entity, and quotes end attribute values. Encoding replaces &, <, >, " and ' with their entities so the text displays literally instead of being interpreted as markup.
Decoding reverses the process, turning named and numeric entities such as &, © or © back into characters. Escaping user input before putting it into a page is a key defense against cross-site scripting (XSS).
Frequently asked questions
- Is this tool free?
- Yes. Encode and decode HTML entities at no cost, with no account required.
- Which characters are encoded?
- The characters &, <, >, ", and ' are converted to their named HTML entities so the text can be safely embedded in HTML markup.
- Does my text leave my browser?
- No. The conversion runs entirely in your browser, so your text is never sent to a server.