Developer Tools

HTML Entity Encoder / Decoder

Encode any text to HTML entities (turning < into &lt;, & into &amp;) or decode HTML entities back to readable text, instantly in your browser. Supports all named entities and numeric character references.

Runs in your browser No data sent to servers Copy or download result
Direction
HTML Entities
Input

Encoding and decoding happen entirely in your browser

Features

  • Encodes <, >, &, ", ' to HTML entities
  • Decodes all named and numeric HTML entities
  • Handles &#x hex and &#decimal references
  • No upload, client-side only

How to use it

  1. Select Encode or Decode mode.
  2. Paste your text.
  3. Result appears instantly.
  4. Copy the output.

Use cases

  • Escaping user-generated content before inserting into HTML
  • Decoding HTML entity-encoded database content
  • Preparing code snippets for display in HTML pages

Limitations

  • Reserved HTML characters can be encoded before placing text into markup.
  • Very large input can be slower on older devices.
  • This utility is designed for common snippets and local inspection, not as a full security or language-specific validator.
Questions & answers

Frequently asked

When should I encode HTML entities?

Encode any user-provided text before inserting it into HTML to prevent XSS. Never insert raw user input directly into HTML.