HTML Encode / Decode
Escape text into HTML entities or decode HTML entities back to text.
To show characters like <, > and & as literal text on a web page rather than have the browser interpret them as code, they must be escaped into HTML entities. HTML Encode / Decode converts text to entities and back, in your browser.
How to use html encode / decode
- 1. Paste text or HTML-encoded content.
- 2. Choose encode (to entities) or decode (to text).
- 3. Copy the result.
When to use HTML Encode / Decode
Display code on a page
Encode a snippet so tags show as text instead of being rendered.
Prevent broken markup
Escape special characters so they don't break your HTML.
Decode entities
Turn & and friends back into their plain characters.
Decoding handles every entity
Decoding understands all named entities (é, , ©) and numeric ones in decimal or hex (€ and € are both €). Encoding text that's already encoded encodes it again — & becomes &amp; — so if you see that in a page, it was escaped twice.
Frequently asked questions
Which characters get encoded?
Exactly five: & < > " and ', which become & < > " and '. Accented letters and emoji are left as they are — on any page served as UTF-8 they display correctly without entities.
Does this make my page safe from XSS?
Escaping output is one important defence, but security depends on your whole setup; don't rely on this tool as your only safeguard.
Is my input private?
Yes — it's processed in your browser.
