इस टूल में कोई समस्या है?

«HTML इकाई एनकोडर ऑनलाइन» के बारे में

यह टूल HTML में विशेष अर्थ वाले कैरेक्टरों को उनके एंटिटी समकक्षों में परिवर्तित करता है। < &lt; बन जाता है, > &gt; बन जाता है, और इसी तरह।

जब वेब पेज पर उपयोगकर्ता-सबमिट की गई सामग्री प्रदर्शित होती है तो क्रॉस-साइट स्क्रिप्टिंग (XSS) हमलों को रोकने के लिए HTML एनकोडिंग महत्वपूर्ण है।

टूल संख्यात्मक एंटिटी एनकोडिंग और गैर-ASCII कैरेक्टरों के लिए नामित एंटिटी एनकोडिंग का भी समर्थन करता है।

इस टूल का उपयोग कैसे करें

How to escape special characters as HTML entities

  1. Paste the text

    Drop the plain string into the "Text" field. The tool encodes every character that has a meaning inside HTML: `<`, `>`, `&`, `"`, `'` become `&lt;`, `&gt;`, `&amp;`, `&quot;`, `&#39;`.

  2. Press Run

    Result returns a single `encoded` field. The output is safe to paste into HTML body text, attribute values (when wrapped in `"`), and most templating engines that don't auto-escape.

  3. What it doesn't cover

    JavaScript string literals, CSS selectors, and URL components have different escaping rules — don't use HTML entity encoding for those. For attribute values like `onclick="…"`, you also need JS escaping inside the string.

  4. Round-tripping

    Run the output through `html-entity-decoder` to confirm round-trip safety. Repeated encoding double-escapes: `&amp;` becomes `&amp;amp;`. If you see `&amp;lt;` in rendered HTML, something already-encoded got re-encoded.