Skip to content

HTML entities encode / decode

Encode or decode < & and similar characters.


About this tool

Encode characters into HTML entities or decode them back to plain text. Essential when you need to show code or symbols literally on a web page.

Why use it

  • Escapes characters like less-than and ampersand so markup is not broken.
  • Decodes entity-laden text back into readable form.
  • Both directions handled instantly and locally.

Common use cases

  • Display HTML code as text inside an article.
  • Fix text that shows raw entities like ampersand-amp-semicolon.
  • Safely embed user input into a template.

Tips

  • Always escape user-supplied content before placing it in HTML.
  • Only a few characters strictly need encoding; the rest is optional.
How to use
  1. Paste text.
  2. Encode or Decode.
  3. Copy.
FAQ
What are HTML entities for?
They safely display characters like <, > and & that would otherwise be read as HTML markup.
Can I encode and decode both ways?
Yes, escape raw text into entities or unescape entities back into characters.
Is my text sent to a server?
No. Everything is processed locally in your browser.
When should I escape HTML?
Whenever you insert user text into a page to prevent broken layout or injection.
Does it cover named and numeric entities?
Yes, common named entities and numeric references are handled.
Will it touch normal letters?
No, only characters that need escaping are converted.