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
- Choose special-character or full encoding mode.
- Enter plain text or HTML entities.
- Encode or decode, then copy or swap the result.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- 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
<section class="notice">Local processing & private by default 🔒</section>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.