Escape special characters as HTML entities so they display as text, or decode entities like & and © back into readable characters. Encoding and decoding run in your browser.
| Character | Entity | Why |
|---|---|---|
& | & | Starts every entity, so it must be escaped first |
< | < | Would open an HTML tag |
> | > | Would close an HTML tag |
" | " | Would end a double-quoted attribute |
' | ' | Would end a single-quoted attribute |
With Also encode non-ASCII on, other characters become decimal numeric entities, for example é becomes é, € becomes € and © becomes ©.
A named entity uses a keyword (©) while a numeric one uses the character's code point in decimal (©) or hex (©). They render identically. The decoder understands all three forms, plus other named entities such as , — and €, because it uses the browser's own HTML parser and nothing in your input is executed.
& and .In application code, use your framework's built-in escaping (React, templating engines) rather than hand-escaping, since it applies the right rules for each context. This tool is best for one-off conversions and for checking results.
Percent-encode URL parts with URL Encode / Decode, escape JSON strings with JSON Escape, or tidy markup with the HTML formatter.