HTML entities encoder and decoder

Turn special characters into HTML entities so they display safely in a web page, or turn entities back into readable text.

Direction

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Encode

By default the characters that are special in HTML are converted: & becomes &amp;, < becomes &lt;, > becomes &gt; and quotes become &quot;. Two options extend that:

  • Also accented letters and other non-ASCII characters: é becomes &eacute; (or &#233;) and € becomes &euro;.
  • Use names where possible: &eacute; instead of the numeric &#233;.

Decode

Choose Entities → text and &lt;p&gt;Caf&eacute; &amp; tea&lt;/p&gt; becomes <p>Café & tea</p>. Named, decimal (&#233;) and hexadecimal (&#xE9;) entities are all recognised.

Encoding matters when you show code or user input in a page: unescaped < characters would be read as tags. For URLs, use URL encode instead.

Frequently asked questions

Is the HTML entities converter free?

Yes. The HTML entities converter is completely free, with no account, sign-up or usage limit.

Is my text stored?

No. Your text is processed in your browser and is not sent to a server or stored.

Is there a maximum length?

No, there is no fixed limit. Very long texts can just be a little slower.