HTML Entity Encoder
Turn special characters into HTML entities or decode them back into plain text. Everything stays in your browser.
Enter your text:
Result:
How to encode or decode HTML entities
- Paste your text into the input box.
- Choose Encode or Decode.
- Optionally encode all non-ASCII characters as well.
- Click Convert and copy the result.
FAQs
What are HTML entities?
HTML entities are escape sequences such as & and < that let you show characters that would otherwise be interpreted as markup.
Why encode non-ASCII characters?
Encoding every character above code 127 makes text safe for old character sets and avoids encoding mismatches in email or legacy systems.
Which characters are always encoded?
The five that matter in markup: ampersand, less-than, greater-than, double quote, and single quote. Everything else is left alone unless you enable full encoding.
Is my text sent anywhere?
No. Encoding and decoding happen entirely in your browser, so nothing you paste is uploaded or logged.
Related Tools
Why encode HTML entities?
When you embed user text in HTML, unescaped characters can break your layout or enable cross-site scripting. Entity encoding keeps special characters displayed literally and safely.
- Show code examples with angle brackets in a web page.
- Sanitize user input before inserting it into HTML.
- Decode an entity-laden string to read what it says.
Tips and Limits
Decoding uses your browser's own entity parser, so it handles named, numeric and hexadecimal entities correctly. Everything runs locally, so your data never leaves your device.