HTML Entity Encoder DecoderEncode five HTML special characters, or decode six common named entities and decimal or hexadecimal character references, locally in your browser.
en

HTML Entity Encoder Decoder

Encode five HTML special characters, or decode six common named entities and decimal or hexadecimal character references, locally in your browser.

Output
<section title="Tom & Jerry">It's ok</section>

Common tasks

  • html entity encoder
  • html entity decoder
  • html escape
  • decode numeric entities
  • html entity encoder decoder online
  • free html entity encoder decoder
  • html entity encoder decoder no upload
  • browser local html entity encoder decoder

Quick answer

Encode converts &, <, >, double quotes and apostrophes to entities. Decode recognizes amp, lt, gt, quot, apos and nbsp, plus decimal and lowercase #x hexadecimal references ending in a semicolon.

How to use

  1. 1. Select Encode or DecodeUse Encode to display markup as text, or Decode to inspect supported entity references.
  2. 2. Paste the textThe result updates immediately. The output is shown as text, not executed as HTML.
  3. 3. Review and copyCheck the target context before copying. Entity conversion alone is not a general HTML sanitizer.

Examples

Encode markup

Input
<b title="A&B">
Output
&lt;b title=&quot;A&amp;B&quot;&gt;

Decode numeric references

Input
&#20320;&#x597D; &copy;
Output
你好 &copy;

Common use cases

  • Display a code example as literal HTML text.
  • Inspect numeric character references in an exported document.

Edge cases

  • The named list is limited: &copy; and unknown names stay unchanged. &nbsp; becomes a regular space, not a non-breaking space. There is no escape-all mode.
  • Decoding makes one pass: &amp;lt; becomes &lt;, not <. Missing semicolons and uppercase #X references remain unchanged.
  • Numeric values above U+10FFFF cause an error. Encoding an existing entity escapes its ampersand again; choose the mode that matches the input.

Features

  • Encode five HTML special characters, or decode six common named entities and decimal or hexadecimal character references, locally in your browser.
  • The result updates immediately. The output is shown as text, not executed as HTML.

Frequently asked questions

What characters are escaped by default?
&, <, >, ", and ' — the five characters that can break HTML when written literally.
Does it support numeric entities?
Encode converts &, <, >, double quotes and apostrophes to entities. Decode recognizes amp, lt, gt, quot, apos and nbsp, plus decimal and lowercase #x hexadecimal references ending in a semicolon.
Is my input uploaded anywhere?
No. Encoding and decoding both run entirely in your browser.