HTML Entity Encoder and Decoder: Escape and Unescape HTML Online
Encode special characters as HTML entities (< & ") or decode entities back to text. Optionally encode every non-ASCII character. Runs in your browser.
Paste text and choose Encode to replace characters such as <, >, & and quotes with HTML entities, or Decode to turn entities such as & and © back into characters.
What it does
- Encode replaces & < > " and ' with entities, which makes text safe to show inside HTML.
- Optionally turns accents, symbols and emoji into numeric entities such as é.
- Decode understands named entities (©), decimal (©) and hex (©) forms.
- Leaves unknown entities as they are.
Example
Before
<a href="x?a=1&b=2">Tom & Jerry's</a>After
<a href="x?a=1&b=2">Tom & Jerry's</a>Frequently asked questions
- Does encoding make user input safe?
- Encoding text before putting it in an HTML page prevents it from being read as tags. It is one part of safe output; the right escaping depends on where the text goes (HTML body, attribute, script or URL).
- Why encode non-ASCII characters?
- Only needed for old systems or pages without a UTF-8 declaration. Modern pages should use UTF-8 and plain characters.
- Does decoding run any script?
- No. Decoding only converts entities to text and never runs HTML.
- Is my text uploaded?
- No. It stays in your browser.
More tools
Code formatters
CSS beautifier CSS minifier HTML beautifier HTML minifier JavaScript beautifier JavaScript minifier JSON formatter YAML formatter XML formatter SQL formatter Markdown preview
Converters
Base64 encoder and decoder URL encoder and decoder Unix timestamp converter CSV to JSON JSON to CSV Number base converter Time zone converter JSON to TypeScript XML to JSON HTML to Markdown Date difference calculator
Text tools
Regex tester Remove duplicate lines Lorem ipsum generator Word counter Case converter Text diff checker
Color and images
Color converter Contrast checker Image to Base64 Image resizer
Network
Subnet calculator Download time calculator Common ports list CIDR to IP range IPv6 address expander and compressor MAC address formatter curl command builder
Server and files
Cron expression explainer chmod calculator HTTP status codes
Encoding and security
Password generator UUID generator Hash generator JWT decoder QR code generator Password strength checker Wi-Fi QR code generator