Convert special characters to HTML entities or decode entities back to characters. Free, instant, and private.
< > & " ') or all characters. Toggle named entities on or off.HTML entities are special sequences of characters used to represent symbols that either have reserved meaning in HTML or cannot be easily typed with a standard keyboard. Every entity begins with an ampersand (&) and ends with a semicolon (;).
For example, the less-than sign < is reserved in HTML because it opens an element tag. To display a literal < on a web page, you must write < instead. If you don't encode it, the browser may interpret it as the start of an HTML tag, breaking your page layout or creating a security vulnerability (cross-site scripting).
The five characters that must be encoded in HTML content are:
& (ampersand) → &< (less-than) → <> (greater-than) → >" (double quote) → "' (single quote / apostrophe) → ' or 'Beyond these five, HTML defines over 2,000 named entities for accented letters, mathematical symbols, currency signs, arrows, and more.
HTML supports two styles of entity encoding, each with trade-offs:
Named entities use a human-readable mnemonic: & for &, © for ©, — for —. They are easier to read in source code and simpler to remember. However, only about 250 named entities are widely supported, and not every character has a named entity.
Numeric entities reference the Unicode code point of a character using either decimal (&) or hexadecimal (&) notation. They work for any Unicode character, including emoji, CJK ideographs, and obscure symbols. The downside is that they are harder to read at a glance.
Use named entities when they exist — they make your markup more readable. Fall back to numeric entities for characters without a named equivalent. This tool's Use named entities checkbox gives you the best of both worlds automatically.
Below is a reference table of the most commonly used HTML entities, organized by category.
| Character | Named Entity | Numeric Entity | Description |
|---|
HTML entities are special codes that represent characters with reserved meaning in HTML or characters that cannot be typed directly. You need them to display symbols like <, >, and & on a web page without the browser misinterpreting them as HTML markup. They also help display special symbols like ©, ™, and — consistently across all browsers and platforms.
Yes, completely. All encoding and decoding runs entirely in your browser using JavaScript. No data is ever sent to a server. You can verify this by disconnecting from the internet and using the tool — it will still work perfectly.
In most cases, encoding only the five special HTML characters (< > & " ') is sufficient and keeps your source code readable. Encoding all characters is useful in specific situations, such as embedding text in XML attributes, ensuring email HTML renders correctly across clients, or when working with systems that may misinterpret certain characters.
HTML encoding converts characters to HTML entities (like &) for safe display in web pages. URL encoding converts characters to percent-encoded format (like %26) for safe use in URLs and query strings. They serve different purposes: HTML encoding is for content displayed on a page, while URL encoding is for data transmitted in URLs.
Yes, this tool fully supports decoding both decimal numeric entities (like € for the euro sign) and hexadecimal entities (like €). It also decodes all standard named entities. Simply switch to Decode mode, paste your encoded text, and the decoded result will appear instantly.