HTML escape on Windows by pasting source text into the browser-based HTML Entity Encoder / Decoder, selecting Encode characters, and converting the five basic HTML syntax characters without installing an application. On a Windows PC, open the HTML Entity Encoder / Decoder and use its normal browser interface. Basic mode replaces ampersand, less-than, greater-than, double quote, and apostrophe with fixed references while leaving ordinary readable text such as ASCII letters, numbers, spaces, tabs, and line breaks intact. Use non-ASCII mode only when a legacy workflow, transport, teaching example, or comparison task genuinely requires numeric references for characters above ASCII 126. Decode mode runs the opposite operation: it asks the browser’s current HTML parser to resolve named, decimal, and hexadecimal references. Text is processed in the browser, with no upload, saved history, or remote table fetch. The result still needs to match its destination: general HTML syntax escaping is not a universal rule for URLs, JavaScript, CSS, SQL, HTTP headers, or XML, and it does not sanitize a document.

What Windows HTML escaping changes
HTML escaping converts literal characters into character references so an HTML parser can treat syntax-bearing content as text. The basic mode uses these fixed mappings:
| Literal input | Basic encoding result |
|---|---|
| & | & |
| < | &lt; |
| > | &gt; |
| " | &quot; |
| ' | &#39; |
Ampersand is encoded first. That order prevents an ampersand introduced by a newly created character reference from being encoded a second time during the same operation. An existing entity in the source will therefore become an escaped ampersand followed by its original reference text rather than being mistaken for a new entity.
The page accepts up to 500,000 JavaScript characters. It does not upload or transmit the input, save conversion history, or fetch a remote entity table. For a longer Windows workflow, begin with a small representative sample and inspect its ampersands and angle brackets before processing more text.
Encode HTML syntax characters on Windows
Use this browser workflow when the text will ultimately be placed into an HTML-aware context.
- Open the HTML Entity Encoder / Decoder page in the browser on your Windows PC. No command prompt or separate application is required.
- Choose Encode characters, then select Basic mode or non-ASCII mode. Basic mode keeps standard ASCII content readable; non-ASCII mode is only necessary when numeric references for characters above ASCII 126 are specifically required.
- Paste the source text into the input area. Keep the paste within the 500,000-JavaScript-character limit and test a short sample first when the text came from a large document or another untrusted source.
- Select the conversion button. The tool converts the pasted characters entirely within the active browser page.
- Inspect the output, paying particular attention to ampersands and angle brackets. Copy it only after confirming that the receiving context is an appropriate HTML workflow.
For readable UTF-8 HTML, basic mode is normally the more legible choice. Converting every non-ASCII character is possible, but it does not automatically make the result safer or more correct for every destination.
Pick the right conversion mode
The available modes solve different jobs, so choose the operation before processing a large block.
- Basic encode: Replaces the five fixed HTML syntax characters and leaves ordinary ASCII letters, numbers, spaces, tabs, and line breaks readable.
- Non-ASCII encode: Performs the same syntax protection and additionally writes every Unicode code point above ASCII 126 as an uppercase hexadecimal numeric reference.
- Decode references: Resolves existing named, decimal, and hexadecimal references into their Unicode characters using the browser’s current HTML parsing rules.
Non-ASCII mode iterates over Unicode code points rather than UTF-16 code units. As a result, an emoji such as 😀 produces one complete hexadecimal reference instead of two invalid references based on surrogate halves. That does not mean every printable character needs an entity. MDN’s character reference glossary notes that modern UTF-8 HTML can contain Unicode directly and recommends avoiding unnecessary references. Use numeric non-ASCII output for a genuine legacy, transport, teaching, or comparison requirement.
Inspect output before copying it
A successful conversion should be reviewed as data, not assumed to be universally safe. Run these checks on the sample result:
- Confirm that ampersands were encoded first and that newly created references were not encoded twice.
- Check that literal less-than and greater-than characters became references when basic syntax protection was required.
- Verify that quotes and apostrophes were handled by the selected encoder rather than added later by a separate script.
- For non-ASCII mode, check every intended character above ASCII 126 and confirm that supplementary characters were not split.
- Confirm that the receiving system uses HTML rules. XML has a smaller predefined entity set and different parsing behavior.
Do not alter the result merely to make it look more secure. Extra escaping can change an existing entity into a different text value, so compare the inspected output with the original source before copying it into a larger workflow.
Decode HTML references
Choose decode mode when you need to inspect what named or numeric references represent. The decoded string can expose markup that was previously hidden behind character references.
- Choose Decode references; an encoding mode is not required for this direction.
- Paste the HTML source or reference text into the input area, observing the same 500,000-character bound.
- Select the conversion button to resolve the references through the browser’s HTML parser.
- Read the result in the plain read-only text area and copy it only after treating it as untrusted text.
Decode support is broader than the small basic encoding table. A detached text area asks the browser to apply the current table defined by the WHATWG HTML Living Standard’s named-character references. This includes legacy aliases, decimal and hexadecimal forms, and references that resolve to more than one code point. Because the browser supplies the parsing behavior, it may preserve or normalize certain legacy details according to the HTML standard it implements.
The decoded result is not inserted into the page as live markup and is not executed by the tool. It is placed in a plain read-only text area. That distinction matters because decoding changes representation, not trust.
Match escaping to the destination
The encoder offers general HTML syntax escaping, but a character reference is interpreted according to its surrounding grammar. A string prepared for an HTML text node is not automatically correct for another system.
- HTML: Basic mode protects common syntax characters, but framework auto-escaping or a trusted templating engine remains preferable when available.
- URLs: HTML character references do not replace URL percent-encoding rules for path segments, query values, or components.
- JavaScript and CSS: Each language has its own string and value grammar; HTML entities are not a general-purpose escaping layer for either context.
- SQL and HTTP headers: Their protocols require dedicated, context-aware handling rather than HTML syntax conversion.
- XML: XML recognizes a much smaller predefined entity set and follows different parsing rules from HTML.
Decoded output can contain markup-looking characters. For example, decoding a script reference can reveal text such as <script>. The tool does not execute that string, but inserting it into an unsafe innerHTML sink could create a vulnerability. Treat decoded text as untrusted data and apply the correct escaping at the final output boundary.
HTML encoding is also not a document sanitizer or a replacement for a Content Security Policy. Use the encoder for character conversion, then rely on context-aware controls, trusted rendering libraries, sanitization where HTML is genuinely required, and broader security defenses for the final application.