HTML entity encode and decode

Escape text for HTML, or decode entities.

HTML entities

Mode

0 lines · 0 characters

0 lines · 0 characters

Results update as you type.

Runs in your browser. Nothing uploaded.

How to encode or decode HTML entities

  1. Choose Encode to escape text for HTML, or Decode to turn entities back into characters.
  2. Paste your text into Input.
  3. Copy the result.

Common uses

  • Show code examples on a web page without the browser treating them as tags.
  • Fix text that appears with literal & or ' in it.
  • Prepare text for HTML emails or older systems that only accept ASCII.

When to encode

  • To show code on a web page, encode it: characters like < and > would otherwise be read as HTML tags. Encoding turns them into &lt; and &gt;, so the code appears as text.
  • Quotes inside an attribute value need to be encoded as &quot; so they don’t end it early.
  • For plain-ASCII files and systems that only accept ASCII, Encode non-ASCII turns letters like é and symbols like © into numeric entities.

Decode does the reverse: paste HTML with entities and get readable text back.