Skip to content
TDToolsOnDuty
Developer Tools

HTML Entity Encoder / Decoder

Escape text to HTML entities or decode entities back to characters.

Free foreverRuns in your browserNo sign-up

About the HTML Entity Encoder / Decoder

Certain characters such as <, >, & and quotes have special meaning in HTML. Escaping them as entities lets you show them as text instead of markup.

This tool encodes text into safe HTML entities, or decodes named and numeric entities back into the original characters.

It is handy for displaying code snippets, preventing broken layouts, and avoiding cross-site scripting when showing user input. Everything runs in your browser.

Key features

  • Encode special characters to HTML entities
  • Decode named and numeric entities
  • Handles &, <, >, quotes and more
  • One-click copy, runs locally

How to use

  1. 1Paste your text or HTML.
  2. 2Click Encode to escape it, or Decode to unescape it.
  3. 3Copy the result.

Frequently asked questions

Why should I escape HTML?
Escaping prevents special characters from being treated as markup, which keeps your layout intact and helps avoid cross-site scripting when displaying user input.
Does it decode numeric entities?
Yes. It decodes both named entities like &amp; and numeric ones like &#39; or &#x27;.