Monu Tools

مرمِّز / فاكّ ترميز كيانات HTML

رمّز النص إلى كيانات HTML أو فُكّ ترميز الكيانات إلى نص، آمن مع UTF-8 ومن جانب العميل.

كيفية استخدام مرمِّز HTML

  1. 01

    الصق نصك أو HTML الخاص بك.

  2. 02

    اختر ترميز (هروب رموز HTML الخاصة)، أو ترميز الكل (هروب رموز غير ASCII أيضاً)، أو فكّ الترميز.

  3. 03

    انسخ النتيجة.

What it does

An HTML entity encoder and decoder for escaping special characters so they display as text instead of being interpreted as markup. It converts characters like < and & into entities such as &lt; and &amp;, and decodes them back again.

Encoding and decoding are UTF-8 safe and run entirely in your browser, so nothing you paste is uploaded.

How encoding works

Encoding always escapes the five characters that have special meaning in HTML: & < > " and '. That is what stops a stray < from being read as the start of a tag, or text from accidentally breaking out of an attribute.

An Encode all option additionally turns every non-ASCII character into a numeric entity, which is useful for legacy systems, some email pipelines, or anywhere you need to be sure the output is pure ASCII.

What decoding understands

Decoding understands all three entity forms: named entities like &amp; and &copy;, decimal entities like &#233;, and hexadecimal entities like &#x20AC;. Sequences it does not recognize are left untouched rather than mangled.

Encoding and XSS

Escaping the HTML specials is the core defense against HTML injection and cross-site scripting (XSS): any untrusted text should be encoded before it is placed into a page, so it renders as harmless characters instead of active markup.

الأسئلة الشائعة

ما الفرق بين ترميز وترميز الكل؟

يهرّب الترميز الرموز الخمسة فقط التي يجب هروبها في HTML (& < > " '). أما ترميز الكل فيحوّل إضافة إلى ذلك كل رمز غير ASCII إلى كيان رقمي، وهو مفيد للأنظمة القديمة أو البريد الإلكتروني.

أي الكيانات يمكنه فكّ ترميزها؟

الكيانات المسماة مثل &amp; و&copy;، والكيانات العشرية مثل &#233;، والكيانات الست عشرية مثل &#x20AC;. تُترك التسلسلات غير المعروفة دون تغيير.

هل يمنع XSS؟

ترميز رموز HTML الخاصة هو الدفاع الأساسي ضد حقن الترميز. رمّز دائماً النص غير الموثوق قبل وضعه في HTML.

المصادر

ضمّن هذه الأداة

أضف هذه الأداة إلى موقعك الخاص. انسخ المقتطف أدناه، ويبقى محدّثاً تلقائياً.

<iframe src="https://monu.tools/embed/ar/html-encoder" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

أدوات ذات صلة