HTML entity encoder — make code safe to show
To show code on a web page without the browser running it, characters like <, > and & must be written as entities: <, >, &. This tool encodes text into entity form, and decodes entity-laden text back to normal.
Bloggers use it to display code snippets; developers use it when generating HTML from user text — a basic step in preventing broken pages and injection bugs.
Open the free html entity encoder on Zentpal — free, no sign-in needed, and it runs in your browser.
How to use it
- Pick Encode or Decode.
- Paste your text or HTML.
- Copy the converted result.
Frequently asked questions
Which characters get encoded?
The essential five — & < > " and ' — plus an option for non-ASCII characters, which become numeric entities like © for ©.
Is entity encoding the same as URL encoding?
No: entities are for inside HTML documents (&), percent-encoding is for inside URLs (%26). Same idea — escaping — different neighbourhoods.
Why does & show as & in source?
Because & starts an entity in HTML, a literal ampersand must itself be escaped. Forgetting it is one of the most common causes of invalid HTML.
Related free tools
- URL encoder / decoder — links that never break
- Base64 encoder / decoder — text in, code out
- CSS minifier & beautifier — smaller files, readable code
Community feed · Chat rooms · Free tools · Local shops · About · Privacy