HTML Encoder / Decoder

Escape HTML special characters or decode entities back. Useful for safely embedding user input or debugging encoded markup.

Enter input above to see the result.

What is this for?

HTML reserves five characters with structural meaning — &, <, >, ", ' — which must be escaped as entities when they appear as content rather than markup. This tool encodes raw text into safe HTML entities and decodes entity references back to plain characters, making it essential for safely embedding untrusted input, debugging mangled markup, and preparing code snippets for documentation.

When to use it

How it works

Common gotchas

Named entities and special characters