TThe TextSolutions
Developer Tools·4 min read·June 13, 2026

What Are HTML Entities? How to Encode and Decode Them Online

Learn what HTML entities are and how to encode or decode them online for free. Understand &, <,  , and special characters with a free HTML entity tool.

Free Online Tool

HTML Entity Encoder

Try it Free →

If you have ever seen & or   in web code and wondered what it means, you have met HTML entities. They let you display special characters on a web page safely and correctly. Our free HTML entity encoder and decoder converts text to and from entity form instantly in your browser.

What Are HTML Entities?

An HTML entity is a special code that represents a character that would otherwise be interpreted as markup, or that is hard to type directly. Entities start with an ampersand (&) and end with a semicolon (;). For example:

  • & represents &
  • &lt; represents <
  • &gt; represents >
  • &quot; represents "
  • &nbsp; represents a non-breaking space
  • &copy; represents ©

Entities exist because some characters have special meaning in HTML. A < always starts a tag, so to display a literal less-than sign you must write &lt; instead — otherwise the browser tries to interpret it as the beginning of an element.

How to Encode and Decode HTML Entities Online

  1. Choose Encode or Decode.
  2. Paste your text into the input box.
  3. Select the scope — encode just the essential reserved characters, or all non-ASCII characters.
  4. Copy the result with one click.

Encoding converts characters into entities; decoding turns entities back into their original characters.

Named vs Numeric Entities

There are two ways to write an entity:

  • Named entities use a human-readable name, like &copy; for ©.
  • Numeric entities use the character's code point, like &#169; (decimal) or &#xA9; (hexadecimal) for ©.

Named entities are easier to read, but numeric entities work for every character, even those without a name.

Why Encode HTML Entities?

Display code as text — Show literal HTML, like <div>, on a page without the browser rendering it.

Prevent broken layouts — An unescaped & or < in content can break the surrounding markup.

Security — Encoding user input before displaying it helps prevent cross-site scripting (XSS) attacks.

Special symbols — Insert symbols like ©, ™, and arrows reliably across browsers.

Frequently Asked Questions

Is the HTML entity tool free? Yes — it is free, requires no sign-up, and runs entirely in your browser.

What does   mean? &nbsp; is a non-breaking space — a space that prevents a line break at that point and is not collapsed like ordinary spaces.

What is the difference between named and numeric entities? Named entities use readable names like &copy;, while numeric entities use the character's code point like &#169;. Both produce the same character.

Is my text uploaded anywhere? No. All encoding and decoding happens locally in your browser.

Need to display special characters on a web page? Paste your text and encode the HTML entities in seconds.

Related Guides

Ready to try it?

HTML Entity Encoder — Free & Browser-Based

Open HTML Entity Encoder