HTML Encoder/Decoder

Encode special HTML characters or decode named and numeric entities safely as plain text.

✓ Free to use · Runs in your browser · No sign-up

Turn special characters into HTML entities, or back again

Encode protects characters such as < and & for HTML text. Decode turns entities such as &lt; back into characters, without displaying them as a web page.

Your data is processed locally in your browser and is not uploaded to our servers.

Up to 100,000 characters. Paste text, not a file URL.
Live preview

How to use HTML Encoder/Decoder

  1. Paste the characters or HTML entities you want to transform.
  2. Choose Encode to turn special characters into entities, or Decode to recover their text.
  3. Read the live result, then copy it or download it as a text file.

A closer look

HTML uses characters such as < and & as syntax. Encoding makes those characters available as visible text: < becomes &lt;, > becomes &gt;, and & becomes &amp;. Quotes are encoded too, while ordinary Unicode characters are preserved. Decoding recognizes named HTML entities as well as decimal and hexadecimal character references. For example, &#x1F44B; decodes to a waving-hand character. The result always stays in a text box; pasted tags are not inserted into the Toolzafi page or executed.

A practical example

Encode <p>Hello</p> to display the tags as text in HTML, or decode &amp; back to an ampersand. The result is shown as text, not run as a page.

A useful tip

Encoding is context-specific. This tool is for HTML character references, not URL encoding, JavaScript string escaping, or sanitizing a complete web application. Choose the existing URL Encoder/Decoder for URL components.

Good questions. Simple answers.

Does decoding render the HTML?

No. A decoded <script> tag remains plain text in the output field.

Why does encoding &lt; produce &amp;lt;?

The ampersand is part of the input text and is encoded once. If your text is already entity-encoded, use Decode first rather than repeatedly encoding it.

Explore all developer tools for related tasks and category-specific guidance, or read how Toolzafi handles your data.

A few more useful tools