HTML Encoder / Decoder
Escape text for safe HTML, or decode entity soup back to readable characters — live, private, in your browser.
Escape code samples and text for HTML — stays in your browser
—
How to encode or decode HTML entities
- Choose Encode or Decode.
- For encode: keep Special chars (default), or Also Unicode for © / € / accents. Pick Named or Decimal style.
- For decode: optionally enable Decode until clean for double-encoded text.
- Paste your text — output updates live. Copy or Swap to reverse.
Why HTML entities still matter
Browsers treat < and & as markup syntax. If you want to show a code sample in a blog, CMS block, or email template, those characters must become entities — otherwise tags vanish or break the layout. Decoding goes the other way: turn <div> soup from exports or CMS paste-backs back into readable HTML without uploading anything.
FAQ
Is my text uploaded?
No. Encoding and decoding run entirely in your browser. DevDock never sends your HTML or text to a server.
What does Special chars encode?
Only the five reserved characters: & < > " and '. That matches the usual htmlspecialchars / HTML-escape need — show markup as text without breaking the page.
Named vs decimal — which should I use?
Named (&, ©) is easiest to read in source. Decimal (&) works for any character, including ones without a standard name. Start with named.
What is Decode until clean?
Some strings are double-encoded (&lt; instead of <). Turning this on runs decode repeatedly until nothing changes (capped), which unwraps CMS-mangled entity chains.
Is this the same as URL encode or Base64?
No. HTML encoding turns characters into HTML entities for markup safety. URL encoding percent-encodes for query strings; Base64 is a binary-safe transport encoding. Use each for its own job.
Need to escape a query string instead? Try the URL Encoder / Decoder. Previewing Markdown that becomes HTML? Use Markdown Preview. Turning markup into React? Use HTML to JSX.