HTML Encoder / Decoder

Encode special characters to HTML entities or decode entities back to characters.

Common HTML Entities

CharacterEntityName
<&lt;Less than
>&gt;Greater than
&&amp;Ampersand
"&quot;Double quote
'&#39;Single quote
 &nbsp;Non-breaking space
Copied!

About This Tool

Encode special characters into HTML entities or decode them back. Prevents code injection and ensures special characters like angle brackets and ampersands display correctly on web pages.

How to Use

  1. Paste your text or HTML into the input field.
  2. Click Encode to convert special characters to HTML entities, or Decode for the reverse.
  3. Copy the result for use in your web pages.

Frequently Asked Questions

Why do I need to encode HTML characters?

Characters like <, >, and & have special meaning in HTML. Encoding them as < > and & ensures they display as text instead of being interpreted as code.

What is the HTML entity for an ampersand?

The ampersand (&) is encoded as & in HTML. This prevents the browser from interpreting it as the start of another entity.