Encoding & Extraction

HTML Entity Encoder Decoder

HTML Entity Encoder Decoder escapes common HTML text characters and decodes entity references.

Try html entity encoder decoder

Paste or type text below. The result updates in your browser.

Example: html entity encoder decoder

Input
<b>
Illustrative result
&lt;b&gt;

How to use this tool

  1. Choose encode or decode.
  2. Paste the snippet or escaped text.
  3. Review the result in its intended HTML context.

Encoding scope

The encoder replaces five common characters: ampersand, less-than, greater-than, double quote, and apostrophe. Thus “<b>” becomes escaped text rather than a literal tag. This is useful for showing markup examples in a page or avoiding accidental markup interpretation in ordinary HTML text.

Decoding scope

The decoder uses a browser HTML parser to turn character references back into text. A string such as “&amp;” becomes “&”. It is not a sanitizer for arbitrary untrusted HTML, and decoded output may contain characters that have special meaning if inserted into markup elsewhere.

Choose the right transformation

HTML to Plain Text removes markup and extracts readable text. JSON String Escape Unescape follows JSON string rules, not HTML entity rules. When placing dynamic content into attributes, scripts, URLs, or style rules, use an encoder or safe DOM API specific to that context; this simple tool does not cover every sink.

Questions people ask

Does it encode every HTML entity?

No; encoding covers five common special characters.

Does decoding remove HTML tags?

No; use HTML to Plain Text for markup removal.

Is decoded text automatically safe to insert into HTML?

No; its use depends on the destination context.