<h1>Hello & "World"</h1>
<h1>Hello & "World"</h1>
The < > " and & characters are all encoded as HTML entities.
Convert HTML special characters to entities and decode escaped HTML back to readable text. Encode &, <, >, ", and ' for safe HTML output, templates, comments, and user-generated content; decode named, decimal, and hexadecimal HTML entities back to Unicode characters.
<h1>Hello & "World"</h1>
<h1>Hello & "World"</h1>
The < > " and & characters are all encoded as HTML entities.
<script>alert('xss')</script>
<script>alert('xss')</script>
Encoding script tags makes injection code harmless in HTML output.
<p>Café & naïve</p>
<p>Café & naïve</p>
Named entities like é and ï are converted back to their Unicode characters.
<a href="/search?q=tea&sort=asc">Tea's "best"</a>
<a href="/search?q=tea&sort=asc">Tea's "best"</a>
Angle brackets, ampersands, quotes, and apostrophes are escaped so the snippet can be displayed as text.
HTML encoding converts special characters into HTML entities so browsers display them as text rather than interpreting them as markup. For example, the less-than sign < becomes <, and the ampersand & becomes &.
This is essential when placing user-supplied text, code snippets, product names, comments, CMS content, or translated strings inside an HTML page. Escaping the right characters helps prevent cross-site scripting (XSS) vulnerabilities and avoids broken layouts caused by accidental tags or attributes.
Encoding replaces the five HTML-special characters with their entity equivalents: & → &, < → <, > → >, " → ", and ' → '.
Decoding is the reverse process: it converts HTML entities — named (for example é), decimal (é), or hexadecimal (é) — back to their Unicode characters. This is useful for reading escaped HTML source, cleaning copied snippets, checking CMS output, or debugging API responses that contain entity-encoded text.
Use the encoder when text must appear inside an HTML document exactly as written: documentation examples, visible code fragments, customer reviews, article titles, form previews, or any field that may contain angle brackets, ampersands, or quotes.
Use the decoder when you need to turn escaped content back into readable text, such as <div>, ©, ©, or 😀. The tool is practical for web development, QA, SEO audits, content migration, email templates, and support tickets where encoded markup is difficult to inspect by eye.
HTML encoding is not encryption and does not hide data. It is an output-escaping technique for the HTML context. It helps the browser treat special characters as text, but it should be used together with proper validation, sanitization, and framework-level escaping in production applications.
Different contexts need different escaping rules. Text inside HTML, values inside URLs, JavaScript strings, CSS, and SQL queries are not interchangeable. For HTML output, encode the special HTML characters; for links and query strings, use URL encoding instead.
Encode text and binary payloads to Base64 and decode them back with UTF-8 support.
Convert text and bytes to hexadecimal format and decode hex sequences back to text.
Encode and decode URL strings and query params for safe transport in HTTP and APIs.
Convert text into 8-bit binary groups and decode binary bytes back into readable text.
Convert ASCII characters and numeric codes for protocol and parser workflows.
Decode JWT tokens in-browser and inspect header, payload, claims, and expiration data.