Markdown & HTML Tools

HTML Entity Encoder / Decoder

Encode special characters to HTML entities for safe embedding in HTML, or decode HTML entities back to readable characters. Handles named entities (&, <), numeric (<), and hex (<) forms.

Live preview available Browser-only No sign-up required
Input text
Options
Mode

All conversion happens in your browser; your text is never sent to a server

Input Text Output Text Browser-only No upload by default

Features

  • Encode mode: converts &, <, >, ", ' to named HTML entities
  • Decode mode: converts all entity forms back to characters
  • Handles named, decimal numeric, and hex numeric entities
  • Toggle between encode and decode with one click
  • Copy result with one click
  • Browser-only

How to use it

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

Use cases

  • Encoding user input before inserting into HTML to prevent XSS
  • Decoding HTML entities in scraped web content
  • Encoding code snippets for display inside <pre> blocks
  • Debugging entity encoding in HTML templates

Limitations

  • Use encode mode before placing literal characters into HTML text content.
  • Complex malformed markup may need manual cleanup after conversion.
  • Review generated output before using it in production or publishing workflows.
Questions & answers

Frequently asked

What entities are encoded?

& → &amp;, < → &lt;, > → &gt;, " → &quot;, ' → &#39;. All other characters are left unchanged.

Does HTML Entity Encoder Decoder upload my input?

Your file or text is processed in your browser and is not uploaded.

What does HTML Entity Encoder Decoder create?

It creates entity-safe text. Use encode mode before placing literal characters into HTML text content.

Can HTML Entity Encoder Decoder handle every edge case?

No. Markup and table formats vary. This tool focuses on practical snippets and common writing workflows.