All Developer

HTML Encoder and Decoder

Encode or decode HTML entities.

html-encoder.local
Result
The result will appear here.

How to use it

  1. Choose Encode or Decode.
  2. Type or paste your text or HTML.
  3. Copy the result.

About this tool

This tool converts characters that have special meaning in HTML, like the angle brackets and ampersand, to and from their entity forms. Encoding escapes the five core characters so text displays literally rather than as markup. Decoding handles the named core entities plus numeric and hex entities, so it covers common cases rather than the full named entity list.

Examples

Input<b>Tom & Jerry</b> (encode)
Output&lt;b&gt;Tom &amp; Jerry&lt;/b&gt;
Input&lt;p&gt; (decode)
Output<p>

Common uses

  • Escape HTML so code shows as text
  • Decode entities from scraped HTML
  • Safely display user text in a page
  • Inspect entity encoded markup

FAQ

Is anything sent to a server?
No. Encoding and decoding run in your browser. Nothing is uploaded.
Which entities are covered?
The five core entities for encoding, and named core plus numeric and hex entities for decoding.
Does it decode every named entity?
No. It handles the common ones and numeric forms, not the full named entity list, so rare names may pass through unchanged.

Related tools

Embed this tool

Paste this snippet to put the tool on your own site. It runs entirely in the visitor's browser, the same as it does here.

<iframe src="https://tooldok.com/embed/html-encoder/" title="HTML Encoder and Decoder by Tooldok" width="100%" height="560" style="border:1px solid #16130d;border-radius:16px;max-width:720px" loading="lazy"></iframe> <p style="font:13px sans-serif"><a href="https://tooldok.com/tools/html-encoder/" target="_blank" rel="noopener">HTML Encoder and Decoder</a> by <a href="https://tooldok.com/" target="_blank" rel="noopener">Tooldok</a></p>