Input

IN
Input
0 chars
OUT
Output
0 chars
#
Entities
0

Output

Common HTML Entities โ€” Click to Insert

About HTML Entity Encoder/Decoder

Convert special characters to safe HTML entities or decode entities back to readable text. Essential for displaying code in HTML, preventing XSS, and handling special characters in web content.

โœ“Named, decimal & hex formats
โœ“Real-time conversion
โœ“90+ named entities supported
โœ“Click-to-insert entity reference

Complete Guide to HTML Entities

Free Online HTML Entity Encoder & Decoder

Encode and decode HTML entities with our free online tool. Convert special characters like <, >, &, and quotes to their HTML entity equivalents, or decode entity strings back to readable text. Supports named entities (&amp;), decimal (&#38;), and hexadecimal (&#x26;) formats.

What Are HTML Entities?

HTML entities are special codes used to represent characters that have special meaning in HTML or characters that are not easily typed on a keyboard. They begin with an ampersand (&) and end with a semicolon (;). For example, the less-than sign (<) is written as &lt; to prevent browsers from interpreting it as an HTML tag.

Types of HTML Entities

๐Ÿ“ Named Entities

  • Human-readable format
  • Example: &amp; &lt; &gt;
  • Easy to remember
  • Limited to predefined names
  • Most commonly used type

๐Ÿ”ข Decimal Entities

  • Uses Unicode code point
  • Example: &#38; &#60; &#62;
  • Works for any character
  • Universal browser support
  • Format: &#NUMBER;

๐Ÿ”  Hexadecimal Entities

  • Hex Unicode code point
  • Example: &#x26; &#x3C; &#x3E;
  • Works for any character
  • Matches Unicode charts
  • Format: &#xHEX;

Why Use HTML Entities?

๐Ÿ”’ Security (XSS Prevention)

  • Prevent cross-site scripting attacks
  • Safely display user-generated content
  • Escape HTML in form inputs
  • Protect against code injection
  • Required for secure web applications

๐Ÿ“„ Display Special Characters

  • Show HTML code as text
  • Display < > & literally
  • Use symbols like ยฉ ยฎ โ„ข โ‚ฌ ยฃ
  • Insert math symbols (ร— รท ยฑ โ‰ )
  • Add arrows, shapes, and more

๐ŸŒ Character Encoding

  • Ensure cross-platform compatibility
  • Handle accented characters (รฉ ร  รผ)
  • Support international characters
  • Work with legacy encodings
  • Avoid encoding issues

๐Ÿ’ป Code Display

  • Display HTML/XML source code
  • Show code examples in tutorials
  • Embed code snippets in pages
  • Documentation and tech writing
  • Syntax highlighting content

Essential HTML Entities

&amp; โ†’ &
&lt; โ†’ <
&gt; โ†’ >
&quot; โ†’ "
&#39; โ†’ '
&nbsp; โ†’ (space)
&copy; โ†’ ยฉ
&reg; โ†’ ยฎ
&trade; โ†’ โ„ข
&euro; โ†’ โ‚ฌ
&pound; โ†’ ยฃ
&deg; โ†’ ยฐ

How to Use This Tool

  1. Choose Mode: Select โ€œEncodeโ€ to convert text to entities, or โ€œDecodeโ€ to convert entities back to text.
  2. Select Format: When encoding, choose between named (&amp;), decimal (&#38;), hexadecimal (&#x26;), or all-characters mode.
  3. Enter Text: Type or paste your text/HTML entities into the input area.
  4. View Output: The converted result appears instantly in the output area.
  5. Insert Entities: Click any entity in the reference table to insert it.
  6. Copy or Download: Use the copy button or download in TXT, HTML, or JSON format.
  7. Swap: Click โ€œSwapโ€ to exchange input and output and toggle the mode.

Common Use Cases

Displaying Code: When writing HTML tutorials, encode tag brackets so they display as text instead of being interpreted as markup.

Form Data: Encode user-submitted content before inserting it into HTML to prevent XSS attacks and broken layouts.

Email Templates: Use entities for special characters in HTML emails to ensure compatibility across email clients.

CMS Content: Encode special characters when content might be processed by multiple systems with different encodings.

Debugging: Decode entity-heavy HTML to understand what the actual content is when debugging rendering issues.

Browser Compatibility

Named Entities:All major named entities (&amp;, &lt;, &gt;, etc.) are supported in every browser. Some newer named entities may have limited support in older browsers.

Numeric Entities:Both decimal (&#38;) and hexadecimal (&#x26;) entities are universally supported across all browsers.

Unicode Characters: Modern browsers support the full Unicode range via numeric entities, allowing any character to be represented.

Perfect For

  • Web developers
  • Content writers & bloggers
  • Email template designers
  • CMS administrators
  • Security engineers
  • Technical writers
  • SEO specialists
  • Front-end developers
  • WordPress developers
  • Documentation authors
  • QA testers
  • Students learning HTML

๐Ÿ”’ Complete Privacy Protection

All encoding and decoding happens entirely in your web browser using JavaScript. No data is sent to any server. Your content remains completely private and secure.