Processed in your browser

HTML Entity Encoder & Decoder

Special mode encodes &, <, >, quotes, and apostrophes. Full mode converts every Unicode code point to a hexadecimal numeric entity without splitting emoji. Decoding supports common named entities plus decimal and hexadecimal numeric entities, and always returns plain text.

Processed in your browser
0 / 1,000,000
Converted output

Tool guide

What is HTML Entity Encoder & Decoder?

HTML Entity Encoder and Decoder generates or inspects textual entity representations. Special-character mode handles characters that affect HTML syntax, while full mode emits numeric entities by Unicode code point. Decoded output is always plain text, which makes inspection safe but does not turn this tool into an HTML sanitizer. Common workflows include the following. Display angle brackets and quotes safely in documentation. Restore common entities found in logs or rich-text data. Inspect numeric entities for emoji and multilingual text. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.

When to use it

  • Display angle brackets and quotes safely in documentation.
  • Restore common entities found in logs or rich-text data.
  • Inspect numeric entities for emoji and multilingual text.

How to use it

  1. Choose special-character or full encoding mode.
  2. Enter plain text or HTML entities.
  3. Encode or decode, then copy or swap the result.
  4. Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
  5. Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.

Runnable examples

The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.

Example 1

<article data-site="JSONLane">5 > 3 && "Unicode 🚀"</article>

Example 2

&lt;section class=&quot;notice&quot;&gt;Local processing &amp; private by default &#x1F512;&lt;/section&gt;

Input rules

  • Encoding input is treated as ordinary text.
  • Numeric entities must end with a semicolon and identify a valid Unicode scalar.
  • Unknown named entities remain unchanged instead of being guessed.
  • Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
  • Named decoding is intentionally limited to amp, apos, gt, lt, nbsp, and quot; unknown named entities remain unchanged.

Output rules

  • Special mode encodes ampersands, angle brackets, and both quote types.
  • Full mode creates hexadecimal entities for complete Unicode code points.
  • Decoded output is text only; tags and scripts are never rendered.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • Numeric entities must end with a semicolon and contain a valid Unicode scalar value.

Limitations and cautions

  • Named decoding is intentionally limited to amp, apos, gt, lt, nbsp, and quot; unknown named entities remain unchanged.
  • Numeric entities must end with a semicolon and contain a valid Unicode scalar value.
  • HTML entity decoding is not HTML sanitization and should not be treated as a security filter.

How your data is handled

Entity scanning and conversion are local, and decoded content is never inserted as executable HTML.

FAQ

Which characters does special mode encode?

It encodes ampersands, angle brackets, double quotes, and apostrophes—the characters most likely to affect HTML syntax.

What does full encoding do?

It converts each Unicode code point to a hexadecimal numeric entity, including one complete entity for each emoji.

Will decoded HTML render?

No. The result is displayed only as text, so tags and scripts are not executed.

Can decoded tags execute on this page?

No. Results stay in a plain-text control and are never injected as HTML or executed as script.

How does full mode encode emoji?

It creates one hexadecimal numeric entity for the complete Unicode code point instead of splitting UTF-16 surrogates.

Can this replace an HTML sanitizer?

No. Entity conversion changes representation only; untrusted HTML still needs context-aware escaping and a proven sanitizer.

Updated: 2026-07-31