Escape or unescape HTML as you type — named, decimal or hex. Runs entirely in your browser.
Also searched as html encode · html escape · html entities · escape html · html entity decoder · html special characters. It is one tool: text to HTML entities, and back.
Pick a direction, type or paste, and the result updates live.
An HTML entity is a way to write a character using only ASCII. The style decides how it is spelled, and the character set decides which characters are touched at all. This readout shows the choice being made.
| Character | Code point | Entity | Kind |
|---|
This is the part almost every HTML-escape tool skips. HTML entities and percent-encoding (URL encoding) are two different systems that happen to both turn awkward characters into ASCII. They escape different characters, they live in different places, and they are decoded by different things. Using the wrong one does not just look wrong — it changes the value.

———| HTML entity | Percent-encoding (URL) | |
|---|---|---|
| What it escapes | characters that have meaning in HTML markup — & < > " ' |
characters that are not safe in a URL — space, & ? # / = +, all non-ASCII |
| Looks like | & & & |
%26 %20 %3D |
| Applies inside | an HTML document: text, attributes, <title>, comments, email HTML |
a URL: query values, path segments, form fields, redirect targets, href values |
| Decoded by | the HTML parser (the browser when it renders the page) | the server / HTTP stack when it parses the request line and query string |
& becomes |
& — so the parser does not read it as the start of an entity |
%26 — so the server does not read it as the next query parameter |
| Example | <b> renders as the text <b> |
a%3Db%26c arrives at the server as the value a=b&c |
& is not %26& is HTML's spelling of the character &, read by the browser while rendering%26 is URL's spelling of the character &, read by the server while routing the request& in a URL does not give the server an ampersand — it gives it the literal text && — starts with &#x, ends with ;%26 — starts with %, no semicolon%x26 or &#%26; — both are invalid in either system& between query parameters?a=1&b=2 — the & really is the parameter separatorhref="?a=1&b=2", so the HTML parser hands the browser the URL ?a=1&b=2a=1%26b=2 as a single value instead of two parameters&, then HTML-escape the whole attribute once& itself and the link is double-encoded?q=<b> does not turn it back into <b> — HTML entities are not its job%3Cb%3E shows the literal text %3Cb%3E — percent-encoding is not its job eitherUse HTML entities when the text will be rendered as HTML markup: user comments, CMS content, form input shown back to a user, values placed inside attributes, and any string you are assembling into an HTML document or an HTML email.
Use percent-encoding when the text will be part of a URL: query-string values, path segments, form data, redirect targets, and any value you place into an href, src, or action.
Use both — in the right order — when user text goes into a link on a page: percent-encode for the URL first, then HTML-escape the finished URL for the attribute. That is the only case where the two appear together, and the order is what keeps the link intact.
No login · Unlimited use · No watermark · Runs only in your browser. This tool converts exactly once, with the entity style and character set you choose, and shows you both while it works.
Learn when to use HTML entities and when to percent-encode URL components, including the correct order when a URL is written into HTML markup.
Every tool on this site runs entirely in your browser. Pick the encoding problem you have: