HTML Encoder
HTML Encoder converts characters that have special meaning in HTML into their entity equivalents — & becomes &, < becomes <, and so on — so the browser shows the text literally instead of treating it as markup. Optionally, every non-ASCII character can be encoded as a numeric entity for maximum compatibility.
It is the right tool when you want to display code samples on a page, store markup as plain text, or paste content into a system that only accepts ASCII. Encoding runs entirely in your browser.
How to use HTML Encoder
- 1
Paste your text
Enter text or markup containing characters like < > & or quotes.
- 2
Choose non-ASCII handling
Turn on Encode non-ASCII to convert accented and Unicode characters into numeric entities too.
- 3
Copy the encoded output
Grab the entity-encoded result and paste it where you need it.
Named vs numeric entities
The five reserved characters — &, <, >, double quote and single quote — are encoded as the well-known named entities &, <, >, " and '. These keep markup from being misinterpreted and are understood by every browser.
Non-ASCII characters such as é, ©, or emoji can additionally be encoded as numeric entities like é. This guarantees they survive transports and editors that are limited to ASCII, at the cost of longer output.
Encoding vs escaping
Full HTML encoding can transform a wide range of characters into entities, which is useful for display and storage. Escaping, by contrast, touches only the handful of characters that are dangerous in markup and is the targeted tool for security.
If your goal is purely to neutralise untrusted input before injecting it into a page, the dedicated HTML Escape tool is the focused choice; use this encoder when you also want to normalise non-ASCII characters.
Frequently asked questions
- What is the difference between this and HTML Escape?
- Escaping handles only the five reserved characters. This encoder does that too, and can additionally convert every non-ASCII character into a numeric entity.
- Will encoded text still display correctly?
- Yes. A browser decodes the entities when rendering, so the reader sees the original characters while the source stays safely encoded.
- Is my text uploaded?
- No. Encoding happens entirely in your browser.
Last updated: