Skip to content
snip tools

HTML entity encode and decode

Escape special characters to HTML entities or decode them back. Runs in your browser.

Runs 100% in your browser

How to encode or decode HTML entities

  1. Choose a mode. Encode to escape special characters, or Decode to resolve entities.
  2. Enter your text. Paste the HTML or text; the output updates live.
  3. Copy the result. Click Copy to use the escaped or decoded text.

About HTML entities

A handful of characters control how HTML is parsed — chiefly <, > and &. To show them as literal text (or to safely embed user input), you replace them with entities. Encoding is a fundamental step in preventing cross-site scripting; decoding is handy when reading escaped content from feeds, exports or databases.

Frequently asked questions

What are HTML entities?
HTML entities are escape codes for characters that have special meaning in HTML or can't be typed directly — for example &lt; for <, &amp; for &, and &copy; for ©.
When should I encode HTML entities?
Whenever you display user-supplied or dynamic text inside HTML, encode < > & " and ' to prevent the browser from interpreting it as markup — the core defence against HTML injection / XSS in templates.
What does decode handle?
Decoding uses the browser's own HTML parser, so it resolves named entities (&copy;), decimal (&#169;) and hex (&#xA9;) references.
Is it private?
Yes — encoding and decoding happen in your browser. Nothing is sent to a server.