Request a tool
DEVELOPER TOOLS · FREE ONLINE TOOL

HTML Entity Encoder/Decoder

Convert special characters to HTML entities and backBrowsers treat angle brackets and ampersands as instructions, not text. The moment you want to display code on a page, those characters must become entities, or the browser renders them as markup. This tool converts in both directions.

✓ Free to use✓ No sign-up✓ Ready in your browser
// HTML ENTITY ENCODER/DECODER · GET STARTED

Use HTML Entity Encoder/Decoder

Convert special characters to HTML entities and back

// HTML ENTITY ENCODER/DECODER · HOW IT WORKS

How to use the HTML Entity Encoder/Decoder

01

Paste your text

Paste the text or HTML you want to convert.

02

Encode or decode

Choose Encode to entities or Decode entities, and pick named or numeric output when encoding.

03

Copy the result

Copy the converted result and paste it into your page or editor.

// HTML ENTITY ENCODER/DECODER · ABOUT THIS TOOL

About the HTML Entity Encoder/Decoder

Pasted a code snippet into a CMS and watched the angle brackets disappear? The encoder converts markup-critical characters (and optionally every non-ASCII character) into entities any browser renders as plain text.

The decoder uses the browser built-in HTML parser, so it understands named entities, decimal and hex codes. Handy for cleaning scraped content, reading RSS feeds, or debugging stray & text.

Where it helps most

Where encoding earns its keep.

Publishing tutorials

Anyone writing tutorials or docs with code samples needs this step, or their examples will execute instead of displaying.

XSS defense

Escaping user-supplied content before inserting it into HTML turns a would-be script tag into harmless visible text.

Legacy content rescue

Scraped or legacy content that arrives entity-encoded becomes readable again with one quick decode pass.

CMS code blocks

Blog posts with code samples pasted into a CMS need entities so the code displays instead of running.

What gets converted

The characters that matter.

The big five

Less-than, greater-than, ampersand and both quotes become <, >, &, " and ' for safe display.

Both entity formats

The decoder handles named entities and numeric ones, so © and © both resolve correctly.

UTF-8 note

Modern UTF-8 pages need entities less often; only the five HTML-significant characters strictly require encoding.

HTML Entity Encoder/Decoder: private by design

Conversion runs entirely in your browser. Nothing uploaded, no signup needed.

// HTML ENTITY ENCODER/DECODER · COMMON QUESTIONS

HTML Entity Encoder/Decoder FAQs

At minimum the less-than, greater-than, and ampersand characters, since browsers interpret them as markup. Double and single quotes should also be encoded when they appear inside attribute values. Most other characters, including accented letters and symbols, can stay as plain UTF-8 in modern pages.