Skip to main content
SnipKit

HTML Entity Encoder/Decoder Online

Encode and decode HTML entities in named, decimal, or hex format.

Processed locally in your browser

Encode special characters as HTML entities or decode HTML entities back to readable text with this free online tool.

Format:
Encode:

Type to encode →

← Type to decode

Common HTML Entities Reference
CharNamedDecimalHex
&&&&
<&lt;&#60;&#x3C;
>&gt;&#62;&#x3E;
"&quot;&#34;&#x22;
'&apos;&#39;&#x27;
©&copy;&#169;&#xA9;
®&reg;&#174;&#xAE;
&trade;&#8482;&#x2122;
&euro;&#8364;&#x20AC;
£&pound;&#163;&#xA3;
&mdash;&#8212;&#x2014;
&hellip;&#8230;&#x2026;

Unlock the full toolkit

Batch processing, no ads, higher limits, and API access.

Go Premium

How to Use

Encode special characters as HTML entities or decode HTML entities back to readable text with this free online tool.

  1. Choose your mode. Click Encode to convert characters into HTML entities, or Decode to convert entity codes back into readable characters.
  2. Select the entity format. Choose between named entities (&amp;amp;), decimal entities (&#38;), or hexadecimal entities (&#x26;) depending on your needs.
  3. Set the encoding scope. Pick "Special characters only" to encode just the five critical HTML characters (<, >, &, ", '), or "All characters" to encode every character for maximum safety.
  4. Enter your text. Paste HTML, code snippets, or entity-encoded text into the input field. The output updates in real time.
  5. Copy the result. Use the copy button to grab the encoded or decoded output for use in your HTML templates, CMS content, or code.

HTML entity encoding is essential for preventing XSS vulnerabilities and ensuring special characters render correctly in web pages. The decoder handles mixed formats — named, decimal, and hex entities can appear in the same input. Everything runs in your browser.

Need to encode data rather than HTML? The Base64 Encode & Decode tool converts text and files to Base64 for embedding in CSS, HTML, or API requests.

Features

  • Real-time bidirectional encode/decode
  • Named, decimal, and hex entity formats
  • Encode all characters or special only
  • Handles mixed entity formats in input
  • No data sent to server

Frequently Asked Questions

What are HTML entities?
HTML entities are special codes used to represent characters that have special meaning in HTML or are not available on a standard keyboard. For example, &lt; represents the < symbol, &amp; represents &, and &copy; represents ©. They prevent browsers from interpreting characters as HTML code.
When should I encode HTML entities?
You should encode HTML entities when displaying user-generated content on a web page to prevent XSS (cross-site scripting) attacks. The five critical characters to always encode are: < > & " ' (less than, greater than, ampersand, double quote, single quote).
What is the difference between named, decimal, and hex entities?
Named entities use descriptive names like &amp; for &. Decimal entities use the character code number like &#38; for &. Hex entities use the hexadecimal code like &#x26; for &. All three produce the same result in browsers. Named entities are more readable, while numeric entities work for any Unicode character.
Can I decode mixed entity formats?
Yes! The decoder handles all three formats simultaneously. You can paste text containing a mix of named entities (&amp;), decimal entities (&#38;), and hex entities (&#x26;) and they will all be decoded correctly in one pass.
Is my data safe?
Absolutely. All encoding and decoding happens entirely in your browser using JavaScript. No data is transmitted to any server. Your content stays on your device at all times.