HTML Escape and Unescape Tool

Escape HTML-sensitive characters for examples, snippets, and safe display, or decode entities back into readable text.

EncodeDecodeHTML
Choose an action and convert.

How this tool helps

HTML entities are useful when text should appear on a page instead of being interpreted as markup. A code example that contains angle brackets, an ampersand in a company name, or a copied snippet from a CMS can behave differently if the characters are not escaped correctly.

How to use it

  1. Paste the text that contains characters such as angle brackets, quotes, or ampersands.
  2. Choose encode when you need text to display safely inside HTML; choose decode when you received entity text and want readable characters.
  3. Copy the output and test it in the exact template, CMS field, or code block where it will be used.

Practical tips

  • Do not encode an entire HTML document if you only meant to display one visible snippet.
  • Decode copied text before editing it heavily, because mixed entities and normal characters can hide mistakes.
  • When working with attributes, pay attention to quotes because they can break the surrounding markup if left unescaped.

FAQ

What characters are encoded?

The tool handles common HTML-sensitive characters including ampersands, angle brackets, quotes, and apostrophes.

Is this the same as URL encoding?

No. HTML entities are for markup display, while URL encoding is for values inside web addresses.

Can this sanitize unsafe HTML?

No. It escapes text for display, but security-sensitive sanitizing needs a dedicated, context-aware sanitizer.

Related tools

Related guide

How to encode and decode HTML entities.