Home/HTML Entity Encoder/Decoder
Developer

HTML Entity Encoder/Decoder

Convert special characters into HTML entities and decode them back.

How to Use the HTML Entity Tool

HTML entities are special codes used to represent characters that have reserved meanings in HTML or characters that are not easily typed on a keyboard.

Encoder Tab

Convert your plain text into safe HTML entities. Choose to encode only special characters, all non-ASCII characters, or every single character. You can also process text line-by-line, upload a file directly, and use the Character Inspector to see the exact Unicode and HTML code for the last character you typed.

Decoder Tab

Paste HTML code containing entities to convert them back into readable text. You can also use the "Strip All HTML Tags" feature to remove all markup and extract only the plain text content from an HTML document.

Reference Tab

Search through a comprehensive list of common HTML entities. Click any entity code (Named, Decimal, or Hex) to instantly copy it to your clipboard.

XSS Check Tab

Paste untrusted user input or HTML to scan for Cross-Site Scripting (XSS) vulnerabilities. The scanner checks for dangerous patterns like script tags, event handlers, and JavaScript protocols. If threats are found, it provides a sanitized version of your input with all special characters safely encoded.

About This Tool

The HTML Entity Encoder/Decoder is a free online tool that converts special characters into safe HTML code, and vice versa.

If you have ever tried to write a tutorial showing HTML code, only to have the browser read it as a real webpage and break your layout, this tool solves that instantly. It encodes characters like < and > into safe entities (&lt; and &gt;). It can also decode entities back into readable plain text.

Beyond basic encoding, it features a searchable reference table for symbols (like copyright © or euro €) and a built-in XSS (Cross-Site Scripting) vulnerability scanner to help developers secure their websites. Everything runs locally in your browser.

How to Use

  1. 1Go to the "Encoder" tab and paste the text you want to convert.
  2. 2Choose your encoding mode (e.g., "Special chars only") and your output format (Named, Decimal, or Hex).
  3. 3To convert entities back to text, go to the "Decoder" tab, paste your HTML code, and view the clean text output.
  4. 4Use the "Reference" tab to search for specific symbols (like currency or math signs) and click to copy their entity codes.
  5. 5Go to the "XSS Check" tab to scan untrusted user input for malicious scripts before putting it on your website.

Frequently Asked Questions

Web browsers read characters like < and > as the start and end of HTML tags. If you want to display those characters as plain text on your screen, you must encode them so the browser knows to just draw the symbol instead of trying to run code.

XSS (Cross-Site Scripting) is a common hack where attackers submit malicious JavaScript into your website's forms. The scanner checks your text for dangerous patterns (like <script> tags) and provides a safely encoded version, neutralizing the threat.

They do the exact same job, just in different formats. A named entity uses a word (like &copy; for ©), while a decimal entity uses a number (like &#169;). Named entities are easier for humans to read, but decimals/hex are sometimes preferred in strict programming environments.

It can! In the Decoder tab, there is a "Strip All HTML Tags" feature. If you check this, it will remove all markup completely, leaving you with pure, readable plain text. This is perfect for cleaning up copied text from a website.

Yes. All encoding, decoding, and security scanning happen directly inside your web browser using JavaScript. Your text and code snippets are never uploaded to a server, ensuring your data remains completely private.

We use cookies

We use cookies to serve relevant ads and improve your experience. Read our Privacy Policy.