HTML Entity Encoder & Decoder — Escape and Unescape HTML
Escape text into HTML entities (named or numeric) and decode entities back to characters. Free, no sign-up, and your files never leave your device.
Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.
Escape text so it displays literally inside HTML — < becomes <, & becomes & — or decode entities like —, ₹ and ✓ back into characters. Choose minimal escaping or convert all non-ASCII characters to named or numeric entities.
Step by step
- Choose Encode or Decode: The output updates as you type.
- Pick an escaping level: Only & < > " ' (enough for safe HTML), or also non-ASCII as named or numeric entities.
- Copy the result: Use Copy or Download.
Handy for
Showing code on a page
Escape HTML so it shows as text in a blog post.
Legacy systems
Convert special characters for ASCII-only systems.
Reading scraped text
Decode entities in exported content.
Templates
Escape attribute values safely.
Good to know
Decoding never runs or renders the HTML — it's done in an inert text field.
Characters without a named entity (like ₹) use numeric entities even in named mode.
Questions
Is escaping enough to prevent XSS?
Escaping & < > " ' makes text safe inside HTML element content and quoted attributes. Other contexts (URLs, JavaScript, CSS) need their own escaping.
Is my data sent anywhere?
No. Everything is processed by JavaScript in your browser tab — nothing you paste or open is uploaded, logged or stored on a server. You can even use the tool offline once the page has loaded.
More Developer Tools tools
- JWT Decoder & Verifier — Decode a JWT's header and payload with readable claims, and optionally verify its signature locally.
- Hash Generator — Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes or HMACs of text and files.
- UUID / GUID Generator — Generate random UUID v4 or time-ordered v7 identifiers in bulk, in the format you need.
- Strong Password Generator — Create strong random passwords or passphrases with a strength meter, using your device's secure randomness.
- Regex Tester — Test regular expressions with live match highlighting, capture groups and a replace preview.
- Unix Timestamp Converter — Convert Unix timestamps in seconds or milliseconds to readable dates in any time zone, and back.