How to use it
- Choose Encode to make text safe for HTML, or Decode to convert entities back to characters.
- Paste your text. The result updates as you type.
- When encoding, the recommended setting escapes only the five characters that have special meaning in HTML. Choose “non-ASCII” if the page or email system can't handle UTF-8 characters, or “every character” to obfuscate a string (for example an email address) from very simple scrapers.
Which characters need escaping
| Character | Entity | Why |
|---|---|---|
& | & | Starts every entity, so a literal ampersand must be escaped first |
< | < | Starts a tag |
> | > | Ends a tag (escaped for symmetry and safety) |
" | " | Ends a double-quoted attribute value |
' | ' | Ends a single-quoted attribute value |
Escaping these five is what prevents user-supplied text from being interpreted as HTML — the core defense against cross-site scripting (XSS) when inserting text into HTML. In your own code, let your template engine or framework do it automatically rather than escaping by hand; this tool is for one-off snippets, blog posts that show code, and debugging.
Decoding entities
Decoding understands all named entities defined by HTML (©, —, , é…), decimal entities (’) and hexadecimal entities (’). It's handy when text from a database, RSS feed, API or CMS export shows up full of codes — a common sign that it was escaped twice. If you still see entities after decoding, click Swap and decode again.
Decoding is done safely: the text is parsed as plain text, never as live HTML, so pasting a snippet that contains scripts doesn't run them.
Frequently asked questions
What is an HTML entity?
A code that represents a character in HTML, starting with & and ending with a semicolon — either a name like © or a number like ©. Browsers display the character instead of the code.
Do I need to encode accented letters like é?
Not if your page is served as UTF-8, which is the default for modern websites (meta charset="utf-8"). Encoding them is only needed for systems that can’t handle UTF-8.
What is the difference between and a normal space?
is a non-breaking space: it looks like a space but prevents a line break at that point, and multiple non-breaking spaces aren’t collapsed into one like normal spaces.
Is my text uploaded?
No. Encoding and decoding happen in your browser.