HTML Encode Entities

Encode text to HTML entities or decode entities back to characters. Supports named entities, decimal codes, hex codes, and Unicode symbols.
0 characters

Options

<div class="hello">Tom & Jerry © 2025</div>
0 entities converted

Common HTML Entities

HTML Entity Reference

Common HTML entities are rendered in the initial page HTML, including named, decimal, and hexadecimal forms for core characters like &, <, and >.

Character Named Decimal Hex Description
& & & & Ampersand
< &lt; &#60; &#x3C; Less-than sign
> &gt; &#62; &#x3E; Greater-than sign
" &quot; &#34; &#x22; Double quotation mark
' &apos; &#39; &#x27; Apostrophe
[nbsp] &nbsp; &#160; &#xA0; Non-breaking space
¡ &iexcl; &#161; &#xA1; Inverted exclamation mark
¢ &cent; &#162; &#xA2; Cent sign
£ &pound; &#163; &#xA3; Pound sign
¤ &curren; &#164; &#xA4; Currency sign
¥ &yen; &#165; &#xA5; Yen sign
¦ &brvbar; &#166; &#xA6; Broken bar
§ &sect; &#167; &#xA7; Section sign
¨ &uml; &#168; &#xA8; Diaeresis
© &copy; &#169; &#xA9; Copyright sign
ª &ordf; &#170; &#xAA; Feminine ordinal indicator
« &laquo; &#171; &#xAB; Left angle quotation mark
¬ &not; &#172; &#xAC; Not sign
® &reg; &#174; &#xAE; Registered sign
¯ &macr; &#175; &#xAF; Macron
° &deg; &#176; &#xB0; Degree sign
± &plusmn; &#177; &#xB1; Plus-minus sign
² &sup2; &#178; &#xB2; Superscript two
³ &sup3; &#179; &#xB3; Superscript three
´ &acute; &#180; &#xB4; Acute accent
µ &micro; &#181; &#xB5; Micro sign
&para; &#182; &#xB6; Pilcrow sign
· &middot; &#183; &#xB7; Middle dot
¸ &cedil; &#184; &#xB8; Cedilla
¹ &sup1; &#185; &#xB9; Superscript one
º &ordm; &#186; &#xBA; Masculine ordinal indicator
» &raquo; &#187; &#xBB; Right angle quotation mark
¼ &frac14; &#188; &#xBC; Fraction one quarter
½ &frac12; &#189; &#xBD; Fraction one half
¾ &frac34; &#190; &#xBE; Fraction three quarters
¿ &iquest; &#191; &#xBF; Inverted question mark
× &times; &#215; &#xD7; Multiplication sign
÷ &divide; &#247; &#xF7; Division sign
&euro; &#8364; &#x20AC; Euro sign
&trade; &#8482; &#x2122; Trademark sign
&larr; &#8592; &#x2190; Left arrow
&uarr; &#8593; &#x2191; Up arrow
&rarr; &#8594; &#x2192; Right arrow
&darr; &#8595; &#x2193; Down arrow
&harr; &#8596; &#x2194; Left-right arrow
&forall; &#8704; &#x2200; For all
&part; &#8706; &#x2202; Partial differential
&exist; &#8707; &#x2203; There exists
&empty; &#8709; &#x2205; Empty set
&nabla; &#8711; &#x2207; Nabla
&isin; &#8712; &#x2208; Element of
&notin; &#8713; &#x2209; Not an element of
&prod; &#8719; &#x220F; Product sign
&sum; &#8721; &#x2211; Summation sign
&minus; &#8722; &#x2212; Minus sign
&radic; &#8730; &#x221A; Square root
&prop; &#8733; &#x221D; Proportional to
&infin; &#8734; &#x221E; Infinity
&and; &#8743; &#x2227; Logical and
&or; &#8744; &#x2228; Logical or
&cap; &#8745; &#x2229; Intersection
&cup; &#8746; &#x222A; Union
&int; &#8747; &#x222B; Integral
&asymp; &#8776; &#x2248; Approximately equal
&ne; &#8800; &#x2260; Not equal
&le; &#8804; &#x2264; Less than or equal
&ge; &#8805; &#x2265; Greater than or equal
&lArr; &#8656; &#x21D0; Double left arrow
&uArr; &#8657; &#x21D1; Double up arrow
&rArr; &#8658; &#x21D2; Double right arrow
&dArr; &#8659; &#x21D3; Double down arrow
&hArr; &#8660; &#x21D4; Double left-right arrow
&spades; &#9824; &#x2660; Spade suit
&clubs; &#9827; &#x2663; Club suit
&hearts; &#9829; &#x2665; Heart suit
&diams; &#9830; &#x2666; Diamond suit

What Are HTML Entities?

HTML entities are character references that let HTML display reserved characters and symbols safely. They begin with an ampersand and end with a semicolon. For example, the less-than sign is written as &lt;, and an ampersand is written as &amp;.

Use this page to encode HTML entities, decode HTML entities, check the ampersand entity, or browse the HTML entity reference table.

Encode HTML Entities

HTML encoding converts characters such as &, <, >, quotes, and symbols into entity references. Encoding is useful when text needs to be shown inside markup without being interpreted as markup.

  • Named entities: readable values like &amp;, &copy;, and &hearts;
  • Decimal entities: numeric values like &#38; and &#169;
  • Hexadecimal entities: hex values like &#x26; and &#xA9;

Start with the HTML entity encoder above, then compare the output against the reference table.

Decode HTML Entities

HTML decoding converts entity references back into readable text. For example, &amp; decodes to &, &lt; decodes to <, and &#xA9; decodes to ©.

The decoder supports named HTML entities plus decimal and hexadecimal numeric references. This makes it useful for reviewing copied HTML snippets, CMS output, escaped JSON strings, and source text that contains encoded characters.

Ampersand HTML Entity: &amp;

The ampersand character starts every HTML entity, so a literal ampersand should be encoded as &amp; when it appears in text. The same character can also be written as decimal &#38; or hexadecimal &#x26;.

Common examples include brand names, query strings shown as text, and code examples: AT&amp;T displays as AT&T. See the first row of the entity table for the ampersand formats.

How to Use This Tool

  1. Paste or type text in the input area above
  2. Select Encode to convert characters to HTML entities, or Decode to convert entities back to characters
  3. Choose named, decimal, or hexadecimal entity output when encoding
  4. Click Convert and copy the result

Frequently Asked Questions

What are HTML entities?
HTML entities are character references used for reserved HTML characters such as <, >, &, quotation marks, and symbols that are not easy to type. They start with & and end with ;. For example, &lt; represents the less-than character.
What is the difference between named and numeric entities?
Named entities use readable names such as &amp; for &, while numeric entities use character codes such as &#38; or &#x26;. Named entities are easier to scan, and numeric entities work for any Unicode character.
Why do I need to encode HTML entities?
Encoding HTML entities helps safely render text in HTML when it is used with proper context-aware escaping. It also ensures special characters display correctly in browsers and avoids breaking your HTML markup when including user-generated content.
How do I use an HTML encoder decoder?
Paste text into the input area, select Encode or Decode, choose named, decimal, or hexadecimal output, and click Convert. The tool works in both directions so you can encode text to entities or decode entities back to readable characters.
Can I encode and decode HTML entities in both directions?
Yes. Switch between Encode and Decode modes, or use the Swap button to reverse your last conversion. You can HTML encode entities to any supported format and decode them back in the same workflow.
Does this tool send my data to a server?
No. All encoding and decoding happens entirely in your browser using JavaScript. No data is ever sent to our servers, making it completely safe for sensitive content.
What characters should I encode for HTML?
At minimum, encode the reserved characters & (&amp;), < (&lt;), > (&gt;), double quotes (&quot;), and apostrophes (&#39; or &apos;). For strict text output, encode non-ASCII characters too.
Can I decode numeric HTML entities?
Yes. This tool decodes named entities such as &amp; and numeric entities in decimal (&#38;) or hexadecimal (&#x26;) format back to their original characters.
What is the difference between HTML encoding and URL encoding?
HTML encoding converts characters to HTML entities for safe display in web pages. URL encoding (percent-encoding) converts characters to %XX format for safe use in URLs. They serve different purposes and use different formats.