How to use the HTML Entity Encoder / Decoder
- Paste text or HTML.
- Click Encode to escape it, or Decode to turn entities back into characters.
- Copy the output.
About this tool
In HTML, < starts a tag and & starts an entity, so to show those characters as text — for example when publishing a code snippet in a blog post — they must be written as < and &. Escaping user text before inserting it into a page is also a basic defence against cross-site scripting (XSS).
Decoding understands named entities ( , ©, …), decimal (₹) and hex (₹) forms. It uses the browser’s HTML parser without running any scripts.
Frequently asked questions
Which characters must be escaped in HTML?
Always & and <. Also > and quotes (" and ') inside attribute values. Encoding all five is the safe default.
What is ?
A non-breaking space — a space that prevents a line break between two words, like “₹ 500”.
Do I need to encode Hindi or emoji?
Not if your page uses UTF-8 (almost all do). Tick the option only for systems that require pure ASCII.