Skip to content
HTML एंटिटी एनकोडर / डिकोडर
Tools

HTML एंटिटी एनकोडर / डिकोडर

नया

HTML एंटिटीज़ को escape और unescape करें — वैकल्पिक numeric एनकोडिंग के साथ।

Mode
Encode
Output

HTML entities reference

Punctuation, arrows, currency, maths and Greek — click any code to copy it.

Symbol Named Decimal Hex
Punctuation & quotes
Arrows
Currency
Maths & technical
Greek letters
Symbols
Copied

Runs entirely in your browser. Nothing is uploaded.

HTML entities online encode और decode करें

यह HTML entities tool तीन काम एक जगह करता है: text को HTML entities में encode करता है, entities को वापस readable text में decode करता है, और एक searchable HTML entities list देता है जिससे आप copy कर सकते हैं। Left pane में type या paste करें और converted result तुरंत right side पर दिखेगा — encode और decode के बीच switch करें, दोनों panes को swap करें, और एक click में output copy करें।

सब कुछ आपके browser में locally चलता है, इसलिए आप जो text convert करते हैं वो किसी server पर upload नहीं होती। कुछ install करने की जरूरत नहीं, कोई account बनाने की जरूरत नहीं, और कोई usage limit नहीं। Page को offline reload करें और यह तब भी काम करता है — क्योंकि इसमें कोई server call नहीं होती।

HTML entities क्या हैं और ये क्यों जरूरी हैं

HTML entity एक short code है जो किसी character को represent करता है। यह हमेशा ampersand से शुरू होता है और semicolon पर खत्म होता है — जैसे &amp; ampersand को और &nbsp; non-breaking space को represent करता है। Entities दो कारणों से होते हैं। पहला, कुछ characters HTML में reserved हैं: एक raw <, > या & को markup के रूप में पढ़ा जा सकता है और आपका page तोड़ सकता है, इसलिए इन्हें &lt;, &gt; और &amp; के रूप में लिखा जाता है।

दूसरा, entities आपको special characters — accents, currency signs, maths symbols और arrows — शामिल करने देते हैं जो type करने में मुश्किल हो सकते हैं या text encoding बदलने पर खो सकते हैं। Reserved characters को escape करना ही एक stray < को layout तोड़ने से और user input के किसी unwanted tag में बदलने से रोकता है। यह web security के लिए बुनियादी है और इसीलिए user input को sanitize करने में HTML entity encoding जरूरी होती है।

Named, decimal और hexadecimal entities

हर character को तीन तरीकों से लिखा जा सकता है। Named entity एक readable keyword use करता है — &copy; copyright sign © के लिए। Decimal numeric entity character का Unicode code point base 10 में use करता है — &#169;Hexadecimal entity base 16 use करता है — &#xA9;। तीनों एक ही © produce करते हैं।

Named entities सबसे पढ़ने में आसान होते हैं, लेकिन केवल लगभग 2,200 characters के HTML5 names हैं। HTML4 में केवल लगभग 255 defined थे। HTML5 named character reference standard ने सैकड़ों और जोड़े — mathematical operators, arrows, और typographic symbols जो पहले उपलब्ध नहीं थे। Numeric entities (decimal या hex) हर Unicode character को cover करते हैं, जिसमें सभी emoji शामिल हैं। जब आप encode करें, अपने context के अनुसार output form चुनें: source code में readability के लिए named, किसी भी character के guaranteed code के लिए decimal या hex।

Searchable HTML entities list — arrows, symbols और बहुत कुछ

Converter के नीचे एक पूरी, grouped HTML entities list है जिसमें punctuation, arrows, currency, maths और Greek letters शामिल हैं। Name, symbol या number से search करें — &rarr; (→) खोजने के लिए 'arrow' type करें, &euro; (€) के लिए 'euro' या ampersand के लिए '38' — फिर symbol, named entity, decimal code या hex code copy करने के लिए किसी भी cell पर click करें।

यह सही HTML character codes grab करने का सबसे fast तरीका है बिना उन्हें याद किए या किसी static reference page पर ढूंढे। List complete HTML5 named character reference standard को cover करती है — 2,200 से अधिक entries — W3Schools पर लगभग 255 entities या FreeFormatter पर HTML4-only partial tables से काफी अधिक। अगर आप नियमित रूप से mathematical notation, typographic symbols, या extended Latin characters के साथ काम करते हैं, तो यह list सब कुछ cover करती है।

FreeFormatter, W3Schools और MDN से तुलना

अधिकांश HTML entity resources static reference pages हैं। W3Schools, MDN का character reference, और FreeFormatter.com सभी entities list करते हैं जिन्हें आप manually देख सकते हैं। इनमें से कोई भी आपको text का एक block paste करके पूरी चीज़ को एक shot में encode या decode नहीं करने देता। FreeFormatter का entity encoder सबसे करीबी alternative है, लेकिन यह processing के लिए आपका text उनके server पर भेजता है, हर conversion के लिए form submit और page reload की जरूरत होती है, और केवल HTML4 entities cover करता है।

यह tool सब कुछ एक page पर, तुरंत, client-side करता है: text का एक paragraph encode करें, decode पर switch करें, फिर entity list search करें — सब एक ही tab में बिना किसी round-trip के। यह केवल HTML4 की बजाय complete HTML5 named character reference set भी cover करता है, जो modern content के साथ काम करते समय matter करता है जिसमें typographic symbols, arrows, या mathematical notation शामिल हों। और चूंकि सब कुछ locally चलता है, आप private content — internal docs, email templates, unreleased copy — encode कर सकते हैं बिना उसे किसी third-party server तक पहुंचाए।

Private, instant और free — offline भी काम करता है

हर conversion — encoding, decoding या entity list से copy करना — आपके browser में JavaScript का use करके locally होती है, इसलिए confidential markup भी कभी आपके device को नहीं छोड़ता। कोई server नहीं, कोई login नहीं, और कोई rate limit नहीं। Tool उसी तरह काम करता है चाहे आपके पास fast connection हो, slow connection हो, या initial page load के बाद कोई connection ही न हो।

इसकी तुलना FreeFormatter.com या online HTML validators जैसे tools से करें जिन्हें हर conversion के लिए एक network request चाहिए। Client projects या internal tooling पर काम करने वाले developers के लिए, encoding locally चलाने का मतलब है आपका markup कभी third-party server पर नहीं जाता। इसे अपना go-to HTML entity converter और reference bookmark करें — HTML escape करने, character codes देखने, या source file या database dump से encoded markup decode करने के लिए।

Frequently asked questions

HTML entities क्या होते हैं?

HTML entities short codes हैं जो उन characters को represent करते हैं जो या तो HTML में reserved हैं या type करना मुश्किल है। हर एक ampersand से शुरू होता है और semicolon पर खत्म होता है — जैसे &amp; एक ampersand (&) है, &lt; एक less-than sign (<) है और &copy; copyright symbol (©) है। ये एक character को literally display होने देते हैं बजाय markup के रूप में treat किए जाने के, और ये guarantee करते हैं कि एक symbol सही तरह से render हो चाहे page की character encoding उसे include न करे। जब आप hand से HTML लिखते हैं या web applications में user input sanitize करते हैं तो आप इन्हें लगातार देखेंगे।

Text को HTML entities में encode कैसे करें?

अपना text left pane में paste करें और mode Encode पर रखें। Choose करें कि कौन से characters escape करने हैं — बस reserved ones (< > & " '), reserved plus हर non-ASCII character, या सब कुछ — और output named, decimal या hex codes में चाहिए। उदाहरण के लिए, named option के साथ, 'Fish & chips <3' 'Fish &amp; chips &lt;3' बन जाता है। Result instantly right पर दिखता है। Copy पर click करें और सीधे अपने HTML में paste करें। सब कुछ आपके browser में होता है — कोई file upload नहीं, कोई account नहीं, और आप एक बार में कितना भी text encode करें कोई limit नहीं।

HTML entities को वापस text में decode कैसे करें?

Mode को Decode पर switch करें और encoded HTML को left pane में paste करें; readable text instantly right पर दिखता है। यह named, decimal और hexadecimal entities समझता है, इसलिए &lt;div&gt; Tom &amp; Jerry &#169; decode होकर <div> Tom & Jerry © बन जाता है। Result को re-encode करना हो तो Swap button से panes flip करें। Decoder एक ही string में mixed entity types handle करता है — named, decimal, और hex सब एक साथ appear हो सकते हैं और हर एक सही decode होता है। FreeFormatter.com के entity decoder को हर conversion के लिए form submit और page reload चाहिए; यह tool real time में update होता है जैसे आप type करते हैं।

&nbsp;, &amp;, &lt; और &gt; क्या हैं?

ये चार सबसे common HTML entities हैं। &amp; एक ampersand (&) है, &lt; एक less-than sign (<) है, &gt; एक greater-than sign (>) है, और &nbsp; एक non-breaking space है — एक ऐसी space जो browser को line wrap करने या उसे collapse करने से रोकती है, value और उसकी unit के बीच handy है जैसे 10&nbsp;kg ताकि वे कभी दो lines में split न हों। आपको & को &amp; के रूप में दूसरों से पहले escape करना चाहिए, अन्यथा &amp; खुद को एक new entity की शुरुआत के रूप में misread किया जा सकता है और double-encoding की समस्या हो सकती है।

Named, decimal और hex entities में क्या फर्क है?

ये एक ही character को लिखने के तीन तरीके हैं। Named entity एक memorable keyword use करता है (&amp;); decimal numeric entity base 10 में character का Unicode code point use करता है (&#38;); hexadecimal entity base 16 use करता है (&#x26;)। तीनों एक ampersand produce करते हैं। Named entities पढ़ने में सबसे अच्छे हैं, लेकिन केवल लगभग 2,000 characters के names हैं, इसलिए numeric entities बाकी सब के लिए fallback हैं — जिसमें emoji भी शामिल हैं, जहां grinning face 😀 &#128512; है। संदेह होने पर, named entities readability के लिए सबसे safe हैं। HTML5 standard ने HTML4 से काफी आगे named entity list expand की; यह tool 2,200 से अधिक named character references का complete HTML5 set cover करता है।

HTML में कौन से characters escape करने जरूरी हैं?

तीन characters page content में special meaning रखते हैं और हमेशा escape होने चाहिए: & (&amp;), < (&lt;) और > (&gt;)। Attribute values के अंदर आपको " (&quot;) और ' (&#39;) भी escape करने चाहिए। Ampersand पहले escape करें, अन्यथा &amp; खुद को entity की शुरुआत के रूप में misread किया जा सकता है और double-escape हो सकता है। Encode mode का 'Reserved' option exactly इन पांच characters को handle करता है और बाकी text को untouched छोड़ता है — form input या template output sanitize करने के लिए ideal, बिना उन characters को over-encode किए जिन्हें इसकी जरूरत नहीं।

Arrow या special symbol के लिए HTML entity क्या है?

Common arrows हैं &larr; (←), &rarr; (→), &uarr; (↑), &darr; (↓) और &harr; (↔), double-line versions &lArr;, &rArr; और &hArr; (⇐ ⇒ ⇔) के साथ। किसी अन्य symbol के लिए, नीचे searchable list use करें — 'arrow', 'heart' या 'euro' type करें, फिर named, decimal या hex code copy करने के लिए click करें। Full list में punctuation, math symbols, Greek letters, currency signs, और सैकड़ों special characters हैं, HTML5 named character reference standard के अनुसार updated। W3Schools केवल लगभग 255 entities list करता है; इस tool में 2,200 से अधिक हैं।

JavaScript में HTML entities decode कैसे करें?

Classic browser trick है DOM को आपके लिए decode करने देना: एक detached textarea create करें, उसका innerHTML entity string पर set करें और उसकी value read करें। उदाहरण: const el = document.createElement('textarea'); el.innerHTML = '&lt;b&gt; &amp; &#169;'; फिर el.value वापस '<b> & ©' देता है। Plain JavaScript में कोई built-in decodeHTMLEntities() नहीं है, इसलिए यह DOM approach — या एक small helper जो matched entity tokens को textarea में feed करता है ताकि stray markup break न हो सके — standard pattern है। यह tool exactly यही करता है, इसीलिए untrusted markup के साथ use करना XSS risk के बिना safe है।

मेरे page पर & की जगह &amp; क्यों दिख रहा है?

यह double-encoding है। Text को एक बार escape किया गया (& को &amp; में बदला) और फिर दोबारा escape किया गया (&amp; के & को &amp;amp; में बदला), आमतौर पर इसलिए क्योंकि एक framework ने ऐसे output को auto-escape किया जो पहले से escape था। यह PHP CMSes और कुछ template engines में common है जो सभी output को default में escape करती हैं — Twig, Smarty, और पुराने WordPress hooks सभी यही करते हैं। Double-encoding confirm करने के लिए यहां value को Decode में paste करें, फिर ensure करें कि आपका template value को safe mark करे या इसे output के point पर केवल एक बार escape करे।

HTML में ©, ™ या em dash कैसे add करें?

© के लिए &copy;, ® के लिए &reg;, ™ के लिए &trade; और em dash (—) के लिए &mdash; use करें। En dash के लिए &ndash; (–) और ellipsis के लिए &hellip; (…) use करें। आप UTF-8 page पर symbol directly paste भी कर सकते हैं, लेकिन named entity unambiguous है और encoding बदलने पर survive करता है। UTF-8 page पर (जो आजकल practically सब कुछ है), © directly paste करना fine काम करता है। Named entities HTML email के लिए सबसे safe choice रहती हैं जहां encoding assumptions Outlook, Gmail, और Apple Mail जैसे mail clients में vary करती हैं।

Non-breaking space के लिए HTML entity क्या है?

यह &nbsp; है (numeric &#160; या &#xA0;)। Non-breaking space दो words, या एक value और उसकी unit को एक ही line पर रखता है और browser को repeated spaces collapse करने से रोकता है — जैसे Mr.&nbsp;Smith या 5&nbsp;km। इसे layout के लिए overuse न करें; spacing के लिए CSS margins या padding use करें। एक common mistake है text indent करने या columns बनाने के लिए multiple &nbsp; entities use करना — यह bad practice है और page resize होने या screen reader में render होने पर टूट जाती है, जो हर एक के लिए 'non-breaking space' जोर से पढ़ता है।

क्या HTML entities case-sensitive होते हैं?

हां। Named entities case-sensitive होते हैं, इसलिए &amp; काम करता है लेकिन &Amp; या &AMP; नहीं, और &Sigma; (Σ) &sigma; (σ) से बिल्कुल अलग character है। Numeric entities केवल hex entity के optional x में case-insensitive हैं — &#xA9; और &#xa9; दोनों © देते हैं। संदेह होने पर, memory से type करने की बजाय यहां reference list से exact code copy करें। Named entity पर case गलत होने से raw code symbol की जगह display होता है, जो hand-written HTML templates में bugs का common source है।

यह FreeFormatter या W3Schools entity tables से कैसे compare करता है?

FreeFormatter.com और W3Schools दोनों static HTML entity reference tables provide करते हैं, लेकिन आप केवल codes look up कर सकते हैं — आप अपना text encode या decode नहीं कर सकते। FreeFormatter का entity encoder सबसे करीबी alternative है, लेकिन इसे हर conversion के लिए form submit और page reload चाहिए, और इसकी entity list केवल HTML 4 named entities cover करती है। W3Schools लगभग 255 named entities दिखाता है। यह tool complete HTML5 named character reference set cover करता है — 2,200 से अधिक entries — और searchable reference को एक live encoder और decoder के साथ एक ही जगह combine करता है, real time में update होता है जैसे आप type करते हैं।

क्या यह tool mobile (iPhone, Android) पर काम करता है?

हां, encoder, decoder, और entity list सभी mobile browsers पर fully काम करते हैं जिसमें Android पर Chrome और iPhone पर Safari शामिल हैं। Layout छोटी screens के अनुसार adapt होता है ताकि दोनों panes vertically stack हों। Mobile के लिए एक tip: अगर one-click copy तुरंत fire नहीं होती तो entity list में एक cell को tap-hold करें browser की copy option trigger करने के लिए। कोई app download नहीं चाहिए — tool किसी भी modern mobile browser में standard web page की तरह run होता है। कोई sign-up नहीं, कोई account नहीं, और किसी भी device पर कोई usage limit नहीं। Initial page load के बाद offline भी काम करता है।