HTML Entity Encoder/Decoder
Encode special characters to HTML entities (&, <, >) and decode back. All in your browser.
Try it with this example
Type <div>hello</div> and encode to see <div>hello</div>. Decode to reverse.
What is this tool?
HTML uses special characters for markup. A less-than sign (<) starts a tag; an ampersand (&) starts an entity. To display those characters as text, you encode them as entities: < for <, & for &, " for quotes. Encoding prevents accidental injection and ensures characters display correctly. This HTML Entities tool encodes text to entities or decodes entities back to characters. Paste, encode or decode, copy. All in your browser.
Use encoding when embedding user content in HTML. Unencoded user input can break layout or enable XSS. Encode before display: "Hello & World" becomes "Hello & World". Decode when you've received entity-encoded text (e.g. from an API or database) and need the raw characters. Entity encoding is a basic security and correctness measure for web output.
Common entities include < > & " ' and numeric codes like for non-breaking space. The tool handles the standard set. For attributes, use quotes around values and encode quotes inside. For script and style content, rules differ—use context-appropriate escaping. This tool is for general HTML entity encode/decode. Combine with other sanitization as needed for your context.
Developers use it when building templates, debugging encoding issues, or preparing content for display. Writers use it when special characters (e.g. ©, —) need to be entity-encoded for legacy systems. All processing is client-side. No data leaves your device. Fast and free. Bookmark it for quick encode/decode when working with HTML.