HTML Encode / Decode

Escape text safely for HTML, or turn HTML entities back into readable characters.

How to encode or decode HTML entities

  1. Paste text or HTML.
  2. Choose Encode or Decode and the options.
  3. Copy the result.

About HTML Encode/Decode

Encode text to HTML entities or decode entities back to text.

Everything works in your browser, so it is instant and private, and your settings are remembered on this device.

Good for

  • Showing code samples on web pages
  • Cleaning up text with & and ' from databases and feeds
  • Escaping user input in templates

Tip: Encode only the special characters for normal UTF-8 web pages — encoding every accented letter makes HTML larger and harder to edit.

Frequently asked questions

What does HTML encoding do?

It replaces characters that have a meaning in HTML — angle brackets, the ampersand and quotes — with entities like < so text is shown as text instead of being read as code. It is essential to prevent broken pages and XSS.

Named, decimal or hex — which should I use?

Named entities (é) are easiest to read, decimal (é) and hex (é) work for every character, including emoji.

What is double-encoded text?

Text encoded twice shows entities on the page, like <. Turn on “Decode double-encoded text” to fix it in one step.

Can I look up an entity?

Yes — the Entity reference tab lists every named entity with its character and codes; search by name or paste a character.

Is my data uploaded?

No. Everything is processed by JavaScript in your browser — nothing you paste or open is sent to a server, so it is safe for API responses, tokens, configs and customer data. It also works offline once the page has loaded.

Related tools

← Back to all tools