HTML Entity Encoder & Decoder
Escape text for safe use in HTML (< & ") or decode entities like and ₹ back to characters.
Result
How to use
- 1
Paste text or HTML.
- 2
Choose Encode to escape it for HTML, or Decode to turn entities back into characters.
- 3
Copy the result, or press Swap to reverse it.
Questions
Which characters must be escaped in HTML?
Always escape & as & and < as < in text. Inside attribute values also escape quotes (" or '). Escaping user input this way is the basic defence against cross-site scripting (XSS).
Is there an entity for the rupee sign ₹?
There's no named entity for ₹, but you can write it as ₹ (decimal) or ₹ (hex). With UTF-8 pages you can also type ₹ directly.
What is ?
A non-breaking space — it looks like a normal space but stops the line from wrapping there, useful between a number and its unit such as “10 kg”.
About this HTML Entities tool
HTML Entity Encoder & Decoder — Escape text for safe use in HTML (< & ") or decode entities like and ₹ back to characters. It is one of 200 free tools on namasivayam.in, made by software engineer Namasivayam Vadivelan for everyday use in India.
Everything is calculated instantly in your browser: nothing you type or upload is sent to any server, there is no sign-up, and it works on mobile and desktop. Paste text or HTML.
Related reading
Articles that go with this tool

How AI Chatbots Actually Work — Explained Simply, Without the Jargon
AI chatbots can write emails, explain code and plan trips. But how do they really work, why do they sometimes confidently get things wrong, and how should you use them wisely?

Passkeys Explained: The Simple, Safer Way to Log In Without Passwords
Google, Apple and Microsoft now let you sign in with passkeys instead of passwords. What a passkey is, why it can’t be phished, and how to set one up in five minutes.

Public Wi-Fi Safety: 8 Rules Before You Connect at Airports, Cafés and Hotels
Free Wi-Fi is convenient, but it can expose your data to strangers on the same network. Eight simple rules to stay safe on airport, café, railway and hotel Wi-Fi.
Related tools
More developer tools you may like
Results are estimates to help you plan. They are not financial, tax or medical advice.