Developer Tools
Free Online HTML Entity Encoder
Paste text or HTML below to escape special characters into safe HTML entities, or decode entities back into readable characters.
How to use the hTML Entity Encoder
- Paste text containing special characters like <, >, or & into the input box.
- Click 'Encode entities' to convert them into safe HTML entities.
- Or paste HTML entities and click 'Decode entities' to convert them back to readable characters.
- Copy the result to use safely inside HTML.
Example
Encoding <b>Bold</b> returns <b>Bold</b> — safe to display as literal text inside an HTML page instead of being rendered as a tag.
Why encode HTML entities?
Characters like <, > and & have special meaning in HTML. If you want to display them as literal text — for example, showing a code snippet on a web page — they need to be converted into entities so browsers don't interpret them as markup.
Two-way conversion
This tool both encodes readable characters into safe entities and decodes existing entities back into their original characters, useful when working with CMS content, code documentation, or scraped HTML.
Frequently asked questions
Common HTML-sensitive characters such as <, >, &, quotes and apostrophes are converted to their entity equivalents.
Typing raw < or > inside HTML content can be interpreted as a tag by the browser; entities let you display them safely as plain text.
Yes, paste the encoded content and click 'Decode entities' to reverse the process.
No, HTML entity encoding and URL encoding serve different purposes — use the URL Encoder/Decoder tool for URLs.