Skip to content
toolavix

HTML Entities Encode & Decode

Escape HTML special characters to entities, or decode entities back to plain text.

  • Free
  • No sign-up
  • 100% private

Runs in your browser — your files never leave your device.

What are HTML entities?

HTML entities are text codes that represent characters with a special meaning in HTML, such as &lt; for <, &gt; for > and &amp; for &, or characters that are hard to type, such as &copy; and &euro;. This tool escapes text so it can be shown safely inside HTML and decodes any named or numeric entity back to the real character, including every entity the browser knows. It runs entirely in your browser.

How to encode or decode HTML entities

  1. 1

    Choose Encode to escape text, or Decode to convert entities back to characters.

  2. 2

    When encoding, pick how far to go: only special characters, named entities for common symbols, or every non-ASCII character as numeric entities.

  3. 3

    Paste your text or HTML into the input box.

  4. 4

    Copy the result or download it as a text file.

Key features

Safe escaping

Always escapes the five characters that can break markup: ampersand, less-than, greater-than, double quote and apostrophe.

Named or numeric

Write © as &copy; or &#169; depending on what your system supports, or leave non-ASCII characters untouched.

Complete decoder

Decoding uses the browser’s HTML parser, so all 2,000+ named entities and decimal and hex numeric references are understood.

Instant and private

Results update as you type and the text is never uploaded.

Frequently asked questions

Which characters must be escaped in HTML?

Always escape & as &amp;, < as &lt; and > as &gt; in text, and also the quote that surrounds an attribute value, &quot; or &#39;.

What is the difference between named and numeric entities?

Named entities such as &eacute; are easier to read, while numeric entities such as &#233; or &#xE9; exist for every Unicode character, including those without a name.

Does escaping HTML prevent XSS?

Escaping untrusted text before inserting it into HTML element content is a key defence against cross-site scripting, but the correct escaping depends on context (attributes, JavaScript, URLs). Prefer a templating library that escapes automatically.

Why does &nbsp; look like a space?

&nbsp; is a non-breaking space. It looks like a normal space but prevents line wrapping and is not collapsed by HTML.

Is my text uploaded to a server?

No. Encoding and decoding happen locally in your browser.

More Developer tools

View all →