Kadben

HTML entities: encode and decode

Paste text to make it safe inside HTML, or paste HTML text to turn its character references back into characters. Decoding follows the HTML standard with all 2,231 named references, as browsers read text.

Runs in your browser. Nothing is uploaded.

HTML entities encoder and decoder

Direction

    How to use it

    1. Choose “Encode” or “Decode”.
    2. Type or paste the text; the result appears as you type.
    3. To encode, choose what to replace: only the special characters, or also every non-ASCII character as a name or a number.
    4. Copy the result, or swap it into the input to go the other way.

    Rules and limits

    How text is encoded and decoded

    Tested limits

    Questions and answers

    Which characters must be escaped in HTML?

    In text, & and < are enough; in an attribute value, also the quote that encloses it. Escaping >, " and ' everywhere, as the minimal option does, is the habit that never leaves a gap.

    Why does &copy without a semicolon still become ©?

    Old pages often left the semicolon out, so the standard keeps 106 old names that browsers still read without it. Newer names need it: &hellip stays as text, while &hellip; becomes …

    Should I encode every non-ASCII character?

    Not for a page saved as UTF-8, which holds every character as it is. Names or numbers help where the text must stay ASCII, for example in some e-mail templates or old systems, and they make invisible characters such as no-break spaces visible.

    Is my text sent anywhere?

    No. The text is converted in your browser and the page sends nothing. Only the chosen direction and options are remembered in this tab, not the text.

    Related tools