HTML entity encoder & decoder

Safely show code or special characters in HTML, or turn entity-filled text back into normal characters.

Mode
HTML entity encoder & decoder: illustration of a code editor with brackets, a colour swatch and a settings gear
HTML entity encoder & decoder is part of our free Developer tools collection. It works in your browser on phones, tablets and computers, with no sign-up.

How to use the HTML entity encoder & decoder

  1. Paste your text.
  2. Choose Encode or Decode (and whether to encode all non-ASCII characters).
  3. Copy the result.

When it's useful

  • Showing HTML code on a web page
  • Fixing text that shows & or ' instead of symbols
  • Preparing text for XML or email templates

Limits to know

  • Decoding supports numeric entities and the most common named ones (such as © and €).

Your privacy

Everything is worked out in your browser. What you type isn't uploaded, saved or shared, and there's no sign-up.

What goes in and what comes out

Input:
Any text or HTML.
Output:
Text with special characters encoded as entities, or decoded back.

Questions

Is it the same as URL encoding?

No. HTML entities are for showing text inside HTML; URL encoding (%20) is for web addresses.

Related tools