HTML Entity Encoder & Decoder
Convert characters to HTML entities and back — escape markup safely for display.
To encode HTML entities, paste text containing angle brackets, ampersands or quotes and they are replaced with safe entity references. This is the standard defence against cross-site scripting when displaying untrusted content inside a web page.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Which characters must be escaped in HTML?
How to use the html entity encoder & decoder
- 1Enter or paste your text or html.
- 2Choose the direction.
- 3Turn "Encode all non-ASCII" on or off as needed.
- 4The result appears immediately — copy or download it.
Embed this tool
Put the working html entity encoder & decoder on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
HTML FormatterFormat and indent HTML properly, preserving inline elements and whitespace sensitivity.Content Security Policy GeneratorBuild a CSP header from common presets, with each directive explained.Data URI GeneratorTurn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.JWT DecoderDecode a JSON Web Token to inspect its header, payload and expiry — locally, never sent anywhere.Punycode ConverterConvert internationalised domain names to Punycode and decode xn-- domains back.URL Encoder & DecoderPercent-encode text for safe use in URLs, and decode encoded URLs back to readable text.
Last updated
More encoders & decoders