Useful Hacks

HTML Entity Encoder

Escape special characters into HTML entities — XML-safe, extended named, decimal or hex.

Processed locally in your browser. Nothing is sent anywhere.
  • Four encoding modes: XML-safe-only (the default, for basic safe text embedding), extended named entities, decimal, or hex.
  • Decimal and hex modes cover every Unicode character, not just a fixed named-entity set — the only way to represent the full range.
  • Stays a genuine inverse of the sibling HTML Entity Decoder tool, which already decodes named, decimal and hex entities.
  • Live output — paste and copy, no button.
  • Runs in your browser; nothing you paste is sent anywhere.

Why this is private

  • Processed locally in your browser. Nothing is sent anywhere.
  • Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
  • Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.

Overview

Escapes special characters into HTML entities — the 5 XML-safe characters (&, <, >, ", ') for basic XSS-safe text, an extended named-entity set for common typography and accented characters, or decimal/hex numeric references that cover the full Unicode range.

How to use it

  1. 1Paste text.
  2. 2Pick an encoding mode.
  3. 3Copy the escaped text into your HTML.

Frequently asked questions

What people use it for

Show code samples on a web pageEscape `<div>` so it displays as text instead of rendering as an element.
Put user-supplied text into a template safelyEncode a name or comment before dropping it into HTML to avoid breaking the markup.
Encode an em dash, curly quote or accented characterSwitch to extended named or decimal/hex mode for typography and international characters the XML-safe mode leaves untouched.
Paste content into a CMS that renders HTMLEscape angle brackets so a snippet isn't interpreted as tags.

Related tools

All web tools

Ready to use HTML Entity Encoder?

HTML Entity Encoder

Search tools

Search for any tool by name, category or keyword