Simple & private
HTML Entity Encoder
Encode or decode special HTML characters.
What is this tool?
Characters like < and & have special meaning in HTML. This tool encodes them into safe entities so they display correctly, or decodes entities back into plain, readable text.
How to use this tool
- Paste your text or HTML-encoded string into the input box.
- Choose "Encode HTML" or "Decode HTML".
- Click "Run tool" to see the result.
Example
Encoding "<b>Hi & bye</b>" produces "<b>Hi & bye</b>", which displays safely inside a web page.
Common use cases
- Displaying code samples correctly inside a web page
- Pasting a user comment into a CMS without breaking the layout
- Decoding entity-encoded text back into plain content
- Preparing text that contains symbols for a forum post
Frequently asked questions
Why do I need to encode these characters? +
Raw characters like < and & can break a page's layout or accidentally create an unintended HTML tag.
Does decoding always reverse encoding exactly? +
Yes, decoding returns the original characters as long as the entities were standard HTML entities.
Can I use this for XML as well as HTML? +
The core entities like < and & are shared with XML, so it generally works for both.