HTML Encode / Decode

How do I HTML-encode text?

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

This tool converts special characters like <, >, & and quotes into their HTML entity equivalents (&lt;, &gt;, &amp; and so on), or reverses the process to decode entities back into readable text. Without encoding, a character like < in user-supplied text gets interpreted by the browser as the start of an HTML tag instead of being displayed literally, which can break page layout or open the door to script injection.

Web developers use it when embedding raw text — code snippets, user comments, or content pulled from another source — into an HTML page safely, and when debugging why a page is rendering a stray tag instead of the literal character it was supposed to show. It's also used in reverse, to decode entity-laden text copied from a webpage's source back into plain, readable text.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators