Toolstia / HTML entities encoder and decoder

HTML entities encoder and decoder

Encode characters such as <, >, & and quotes so they show up as text in HTML, or decode entities back into normal characters. You can also turn non-English letters into numeric entities.

How it works

  1. Choose encode or decode.
  2. Paste your text.
  3. Copy the result.

Why encode

In HTML the characters < and > start tags, and & starts an entity. To show them as plain text, or to put code samples safely on a page, they must be written as &lt;, &gt; and &amp;.

Quotes

Double quotes become &quot; and single quotes become &#39;, which keeps attribute values from breaking when you put text inside them.

Non-English characters

Turning on the extra option writes characters such as é, ৳ or emoji as numeric entities, like &#233;. This is useful for old systems that cannot store them directly. Modern pages can usually use UTF-8 text without this.

Not a security guarantee

Encoding helps display text safely, but how you escape depends on where it goes. For web apps, use your framework's built-in escaping for each context.

Questions

Does decoding handle named entities?

Yes, such as &copy;, &nbsp; and &euro;, as well as numeric ones.

Is anything uploaded?

No. Everything is done in your browser.

Does decoding run scripts in my text?

No. The text is only decoded, never displayed as page content.

Is encoding the same as URL encoding?

No. URLs use percent codes, so use the URL encoder for those.