HTML Entity Encoder / Decoder

Convert between plain text and HTML entities. Supports named and numeric (decimal/hex) references, all processed in your browser.

Last updated: 2026/10/16 Developer Feedback & bug reports

Encode Options

Reference type
Scope
Input
Result
Characters: 0

Common HTML Special Characters

Click an entity to copy it.

Char Named Decimal Hex Description
& Ampersand
< Less-than
> Greater-than
" Double quote
' Apostrophe
Non-breaking space
© Copyright
® Registered trademark
™ Trademark
€ Euro
¥ Yen / Yuan
£ Pound
¢ Cent
§ Section sign
° Degree
± Plus-minus
× Multiplication
÷ Division
… Ellipsis
— Em dash
– En dash
• Bullet
« Left guillemet
» Right guillemet
→ Right arrow
← Left arrow

How to Use

1

Choose a Mode

Select the "Encode" or "Decode" tab. In encode mode you can also set the reference type and scope.

2

Enter Text

Paste your text into the input field and the result is converted in real time.

3

Copy the Result

Click "Copy" to grab the converted output with one click and paste it anywhere.

About HTML Entity Conversion

HTML entity conversion replaces characters that have special meaning in HTML — such as &, <, >, and " — with references like "&amp;amp;" or "&amp;lt;", and converts them back again. Escaping these characters prevents broken markup and XSS (cross-site scripting), and lets you display text safely without corruption. This tool runs entirely in your browser, so your input is never sent to any server.

Features

  • Real-time ConversionEncode or decode instantly as you type. No waiting for results.
  • Named & Numeric ReferencesFreely switch between named (&amp;), decimal (&#38;), and hex (&#x26;) references.
  • Reference Table IncludedBrowse a table of common special-character entities and copy any with a click.
  • Fully PrivateAll processing happens in your browser. Text is never sent to servers.

Use Cases

  • Display source code as-is in blogs and CMSs
  • Safely show symbols like & < > " inside HTML
  • Escape user input as an XSS countermeasure
  • Restore garbled entities (e.g. &#12354;) back to characters
  • Clean up special characters in email signatures and templates

FAQ

What is an HTML entity?
It is a reference notation for characters that have special meaning in HTML or are hard to type directly. For example, "<" is written as "&lt;" and "&" as "&amp;". There are named references and numeric references using character codes (&#38; or &#x26;).
What is the difference between named and numeric references?
Named references use readable names like &amp;. Numeric references use the character code in decimal (&#38;) or hex (&#x26;). Named references are more readable, while numeric references can reliably represent any character.
Why is escaping necessary?
Writing & < > " directly can be misinterpreted as part of tags or attributes, causing broken layouts or XSS (cross-site scripting). Converting them to entities lets the characters display safely as text.
Is my text sent to a server?
No. All conversion happens locally in your browser via JavaScript. Your input is never sent to or stored on any external server.
Can I convert Japanese or emoji?
Yes. Choose "All non-ASCII characters" as the scope to convert Japanese, symbols, emoji and more into numeric references. When decoding, both named and numeric references are restored automatically.
Does it work on smartphones?
Yes. It works on any device with a modern browser, including smartphones, tablets, and PCs.