HTML Entity Encoder / Decoder
Encode & decode HTML entities
Escape special characters like <, >, & and quotes into HTML entities, or decode entities back to readable text — instantly, in your browser.
The converted text will appear here.About the html entity encoder / decoder
HTML entities let you display characters that have special meaning in HTML — such as <, >, & and quotes — without the browser treating them as markup. Encoding is essential when inserting untrusted text into a web page to prevent cross-site scripting (XSS).
This tool escapes the five core XML/HTML characters ( & < > " ') and optionally encodes every non-ASCII character as a numeric entity. Decoding handles named entities (like © and —) plus decimal and hexadecimal numeric entities (—, —).
Options
- Encode quotes — also escape
"and'(recommended for attribute values). - Encode all non-ASCII — render every character above U+007F as a numeric entity.
How to use the html entity encoder / decoder
Choose a mode
Switch between Encode (text → entities) and Decode (entities → text).
Paste your text
Type or paste the text you want to convert into the input box.
Set options (encode only)
Toggle quote encoding and non-ASCII encoding as needed.
Copy the result
The converted text appears instantly — click Copy to use it.
Frequently asked questions
Why should I encode HTML entities?
What is the difference between named and numeric entities?
Should I encode quotes?
Does decoding handle all named entities?
Is my text sent to a server?
I want to…
Common reasons people reach for the html entity encoder / decoder — see if it matches your task.
- Escape HTML special characters into entities
- Decode HTML entities back to readable text
- Encode <, >, & and quotes for safe HTML output
- Convert pasted HTML entities to plain text
Related free tools
More free online utilities that pair well with this one — same-category tools for the same task, plus handy extras from other categories.
More developer & security tools
- Base64 Encoder / DecoderConvert plain text or images to Base64 strings
- JWT DecoderDecode JSON Web Token header & payload
- HTML / CSS MinifierStrip whitespace and line breaks to compress code
- Cron Expression GeneratorBuild cron expressions & see next runs
- Curl-to-Code ConverterConvert curl commands to fetch, Python & PHP