How to encode and decode HTML entities (&, <, ₹)
Characters such as <, > and & have special meaning in HTML. To display them as text you write <, > and &. HTML entities converts both ways.
Steps
- Choose Action: encode or decode.
- Optionally tick Also encode accented letters and symbols (such as é, ₹ and emoji) to get plain ASCII output.
- Paste your text and copy the result.
Examples
5 < 7 & 8 > 3becomes5 < 7 & 8 > 3.Price ₹500decodes toPrice ₹500.
Why it matters
Showing user-supplied text without encoding it is the root of cross-site scripting (XSS) bugs. Encoding on output is a basic defence, but real applications should use their framework’s escaping rather than hand-pasting results.
Tips
- Encode only once; double encoding shows up as
&lt;. - URLs use a different scheme: see URL encode/decode.
- For JSON strings use the escape mode in JSON formatter.