How to use the HTML Entity Encoder Decoder
- 1. Pick a directionEncode text to entities, or decode entities to text.
- 2. Choose how muchOnly HTML special characters, common symbols too, or every non-ASCII character.
- 3. CopyConvert and copy the result.
Why entities matter
Five characters have special meaning in HTML: &, <, >, " and '. If you want to show them, for example to display code in a blog post, you must write them as entities: &, <, >, " and '. Otherwise the browser treats them as markup.
Escaping user input this way is also the core defence against cross-site scripting (XSS). A comment containing <script> is shown as harmless text instead of being run.
Worked example
The sample is <a href="/fees">Fees & offers</a> — save ₹2,000 © 2026. With only special characters, 7 entities are written: two <, two >, two quotes and one &. With common symbols too, the dash, rupee sign and copyright sign are also converted (—, ₹ and ©), making 10. ₹ has no named entity in HTML, so it is written by its code point, 8377.
Modern pages saved as UTF-8 can show ₹, ©, — and Hindi text directly, so encoding symbols is optional. Encode them only when your text passes through a system that mangles non-ASCII characters, such as some old email tools or databases.
Decoding uses a detached text box inside your browser, so tags in the text are never turned into real elements or run.
Frequently asked questions
Should I encode before saving to a database?
Usually no. Store the original text and escape it when you put it into HTML. Most template engines and React do that for you.
What is the difference between ' and '?
Both mean an apostrophe. ' works everywhere, including very old HTML.
Can it decode numeric entities like ₹?
Yes, both decimal (₹) and hex (₹) forms.
Is the html entity encoder decoder free?
Yes, it is free. Your first conversion asks for your name and WhatsApp number once, and after that the html entity encoder decoder and every other Uncodemy tool open without the form.