Decode accepts named entities (&lt;, &amp;) and numeric forms (&#60;, &#x3c;). Encode escapes & < > quotes so markup can be shown as text.

Help Us Improve

—

(—)

HTML decoder & encoder

Decode HTML entities back to readable markup, or encode <, >, &, and quotes. Local-first. No signup.

What is an HTML decoder?

An HTML decoder (HTML entity decoder) converts character references such as &lt;, &amp;, and &#60; back into characters. The same page can encode those characters so markup is safe to show as text. Use this free local-first HTML decoder when you need to read or escape entities—no signup.

HTML decoder features

Encode and decode HTML character references.
  • HTML decode

    Turn named and numeric entities back into readable text.

  • HTML encode

    Escape &, <, >, and quotes so markup can be shown as text.

  • Named or numeric

    Encode as &lt;, &#60;, or &#x3c;.

  • Full named set

    Decode uses the WHATWG named character reference table.

How to decode HTML entities

From escaped markup to readable text.
  1. Paste encoded HTML

    Drop in a string that contains &lt;, &amp;, or numeric references.

  2. Read the decode

    The output updates as you type—no submit step.

  3. Encode the other way

    Switch mode to escape characters before embedding HTML in a page or JSON string.

Tips for HTML encode / decode

Avoid common entity mistakes.
  • 01

    Decode once per layer

    Double-encoded text (&amp;lt;) needs two passes to become <.

  • 02

    Encode before innerHTML

    Escape user text so < and & are not treated as markup.

  • 03

    URL encoding is separate

    Percent-encoding (%20) is a URL job—use URL Encoder for that.

  • 04

    Keep newlines

    Tabs and line breaks stay as-is unless you also encode non-ASCII.

Great for

When an HTML decoder helps.
  • Escaped snippets

    Read HTML that was stored as entities in a CMS or email.

  • Safe display

    Encode a fragment before placing it in a page as text.

  • Debugging markup

    See whether a string is still entity-encoded.

Why decode HTML here

Fast local HTML entity conversion.
  • Local-first

    Text never leaves the browser for this tool.

  • Free

    Unlimited encode and decode with no signup.

  • Both directions

    HTML decoder and encoder in one place.

  • Spec names

    Named entities follow the WHATWG character reference list.

Technical notes

How this HTML codec works.
Decode
Named references from the WHATWG table, plus &#decimal; and &#xhex;.
Encode
Escapes & < > " ' as named, decimal, or hex entities.
Non-ASCII
Optional extra pass encodes code points above 126 as numeric references.
Privacy
Client-side only—no network upload.

Sources & References

HTML character-reference references.
  • “This table lists the character reference names that are supported by HTML, and the code points to which they refer. It is referenced by the previous sections.”
    — HTML Living Standard — Named character references

    WHATWG — Named character references: Source of the named entity table this decoder uses (semicolon form). html.spec.whatwg.org/multipage/named-characters.html

  • “The term "HTML Entity" is used as a synonym for a character reference — a pattern of characters that can represent another character in the HTML.”
    — MDN Web Docs — Glossary: Entity

    MDN — Entity: Defines the entity syntax (&name;) that encode and decode operate on. developer.mozilla.org/en-US/docs/Glossary/Entity

  • “In HTML, a character entity reference is a construct that consists of an ampersand, followed by the name of a character, followed by a semicolon.”
    — Wikipedia — List of XML and HTML character entity references

    Wikipedia — Character entity reference: Background on named versus numeric character references in HTML. en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

Frequently Asked Questions

Quick answers about this tool—open a question to read more.