HTML Entity Encoder / Decoder

Encode or decode HTML entities (&, <, ', etc.).

Result
<div class="hello">Ada & Grace said "hi"</div>
Runs entirely in your browser — nothing you paste is sent to a server.

About this tool

Encode strings for safe HTML output or decode legacy content back to plain text. Handles named entities and both decimal and hex numeric entities.

How it works

  1. Choose encode or decode.
  2. Encode replaces &, <, >, " and ' with their entity forms.
  3. Decode understands named entities and numeric forms (&#39;, &#x27;).

When to use it

  • Sanitizing user input before rendering it as HTML.
  • Debugging why a CMS shows &amp;amp; instead of &.
  • Preparing an HTML email snippet that must survive a plain-text quote block.

FAQs

Related resources