HTML Entity Encoder

Next

Paste text to replace five common HTML-sensitive characters locally in your browser: &, <, >, ", and '. The encoder uses &amp;, &lt;, &gt;, &quot;, and &apos;. In Decode mode, your browser reads entity text back into ordinary characters. Your text stays in this browser session.

How to encode or decode HTML entities

  1. 1

    Pick a direction

    Encode (text to entities) or decode (entities back to text).

  2. 2

    Paste your input

    Enter plain text or entity text that you want to inspect.

  3. 3

    Review the five replacements

    Encode changes only ampersands, angle brackets, double quotes, and apostrophes.

  4. 4

    Copy the result

    Copy the generated text when it is useful for your own workflow.

What this encoder changes

The Encode mode has one fixed set of replacements. It does not offer a choice of numeric, hexadecimal, or alternative named entity forms.

Character Output from Encode mode
& &amp;
< &lt;
> &gt;
" &quot;
' &apos;

Decode mode

Decode mode asks the browser to interpret the entered entity text. It is helpful for checking a short value or reading entity text. Browser parsing can vary for unusual or malformed input, so verify the result if it is going into a production system.

Keep context in mind

This is a small text conversion tool, not a complete security policy or HTML sanitizer. Different places in an application, such as HTML attributes, JavaScript, CSS, and URLs, can need different handling. Follow the encoding and validation guidance for the framework or platform where you will use the result.

Frequently Asked Questions

It replaces &, <, >, double quotes, and apostrophes with fixed named HTML entities. It leaves other characters unchanged.

Encode mode also replaces the ampersand in existing entity text. For example, encoding &amp; produces &amp;amp;. Decode first if you need to return an existing entity to a character.

No. Encode mode has a fixed five-character conversion. It does not convert letters, emoji, or other Unicode characters into numeric or hexadecimal entities.

No. The conversion and the funnel session state run in your browser. Text and results are not added to the page URL or sent through the tool server.

Related Tools

Tool available in other languages