HTML Entity Encoder / Decoder

Convert special characters to HTML entities and back instantly.

Text to HTML Entities

Input Text 0 chars
Failed to process input.
HTML Entities Output 0 chars

What are HTML Entities?

HTML entities are special codes used to display reserved characters (like < and >) or invisible characters (like non-breaking spaces) in web pages. Since HTML uses certain characters for its syntax, using these characters directly in your text can confuse browsers into interpreting them as markup.

For example, if you want to display <div> on a webpage without the browser interpreting it as an actual HTML tag, you must use entities: &lt;div&gt;.

Types of HTML Entities

There are three main ways to represent an HTML entity:

  • Named Entities: Easy to remember and read. They start with an ampersand (&) and end with a semicolon (;). Example: &copy; for ©.
  • Decimal Entities: Based on the character's decimal Unicode value. Example: &#169; for ©.
  • Hexadecimal Entities: Based on the character's hexadecimal Unicode value. Example: &#xA9; for ©.

Why use an Encoder/Decoder?

Manually typing or converting special characters can be tedious, especially for large blocks of text or when dealing with international characters and emojis. This tool allows you to instantly encode any text into HTML-safe entities, preventing Cross-Site Scripting (XSS) vulnerabilities and ensuring proper rendering across all browsers. Conversely, if you have a block of raw HTML source code filled with entities, the Decode mode makes it readable again.

Client-Side Privacy

Your privacy is important. This HTML Entity tool runs entirely locally inside your browser using JavaScript. When you paste or type text, it is never uploaded or transmitted to any server. Because it requires zero server interaction, the tool works fully offline once loaded.