🔤

HTML Encoder/Decoder

Encode special characters to HTML entities and decode back

93 visits

HTML Encoder/Decoder converts the five characters that have special meaning in HTML (&, <, >, " and ') into their safe entity form, or reverses the process to turn entities like &amp; back into plain text.

Enter text with special characters (< > & " ')

How to use HTML Encoder/Decoder

  1. 1

    Paste your text.

  2. 2

    Choose Encode (plain text to entities) or Decode (entities to plain text).

  3. 3

    The converted result appears instantly.

  4. 4

    Copy the result for wherever you need it.

Everything you need to know about HTML entity encoding

What does HTML encoding solve?

Certain characters (`<`, `>`, `&`, quotes) have special meaning in HTML — typing them directly into content can break the page's markup or, worse, accidentally introduce a security vulnerability. Encoding converts them into safe entity codes (`&lt;`, `&amp;`, etc.) that display correctly without being interpreted as markup.

When you actually need this

  • Displaying code snippets or markup examples on a web page without them being rendered as actual HTML.
  • Safely inserting user-generated content that might contain special characters.

Decoding works the other way

This tool also decodes — turning entity codes back into their original characters — useful when you've received HTML-encoded text and need to read or process the real content.

Frequently Asked Questions

Why would I need to encode these characters?

If a literal < or & ends up inside HTML content without encoding, a browser can misread it as the start of a tag or entity, breaking the page or, in the worst case, enabling injected content. Encoding makes the characters display safely as text.

Which characters does this convert?

The five with HTML significance: & becomes &amp;, < becomes &lt;, > becomes &gt;, " becomes &quot;, and ' becomes &#39;.

When would I need to decode instead?

When you've received HTML-encoded text (for example, from an API or a CMS export) and need the actual readable characters back, such as turning &amp; back into &.

Does this tool send my text to a server?

No — the conversion happens entirely in your browser; nothing you enter is transmitted or stored.

Is this tool free to use?

Yes — completely free, with no signup and no usage limits for casual use.