تخطى إلى المحتوى الرئيسي

ترميز وفك ترميز كيانات HTML

رمّد الأحرف الخاصة ككيانات HTML أو فك ترميز كيانات HTML إلى نص عادي.

Input
0 chars | 0 bytes
Encode
Output
0 chars | 0 bytes

HTML reserves several characters for its own syntax: angle brackets delimit tags, ampersands introduce entities, and quotes delimit attribute values. When user-generated content, code samples, or international text contains any of these characters, they must be converted to HTML entities before insertion into a page — otherwise the browser will interpret them as markup, breaking layout or, worse, enabling cross-site scripting attacks.

This tool is useful for template authors escaping dynamic content, developers writing documentation with inline code examples, and anyone who needs to embed XML or HTML snippets inside an HTML page. You can also run it in reverse to decode entity-heavy strings from email clients, legacy CMS exports, or scraped HTML back into readable text.

كيف تُرمّز وتفك ترميز كيانات HTML على الإنترنت

  1. 1

    الصق النص أو HTML

    الصق نصًا عاديًا للترميز، أو الصق نصًا مشفرًا بكيانات HTML لفك ترميزه.

  2. 2

    اختر التشفير أو فك التشفير

    التشفير يُحوّل أحرفًا مثل < و> و& و" إلى تسلسلات كيانات HTML آمنة. فك التشفير يعكس العملية.

  3. 3

    انسخ الإخراج الآمن

    انسخ النتيجة. يُعرَّف كلٌّ من الكيانات المُسمَّاة (&amp;) والكيانات الرقمية (&#38;) عند فك الترميز.

How HTML Entity Encoding Works

HTML defines two syntaxes for character references. Named entities use a mnemonic label — `&amp;` for `&`, `&lt;` for `<`, `&gt;` for `>`, `&quot;` for `"`, and `&apos;` for `'`. Numeric character references address Unicode code points directly: `&#60;` and `&#x3C;` both encode `<` using decimal and hexadecimal respectively.

Modern HTML5 parsers are remarkably lenient and will often recover from missing semicolons or unencoded ampersands, but that leniency is not a reason to skip encoding. Security scanners, XML parsers, and email clients are far stricter. The minimal safe set to always encode is `&`, `<`, `>`, `"`, and `'`; everything else is optional but sometimes useful for ensuring ASCII-only output.

لماذا تستخدم أداة كيانات HTML من FileCrank؟

  • ✓ ترميز جميع الأحرف الخاصة في HTML بما فيها < و> و& و".
  • ✓ فك ترميز الكيانات المُسمَّاة (&nbsp;) والكيانات الرقمية (&#60;).
  • ✓ تغطية نطاق Unicode الكامل مع احتياطي الكيانات الرقمية.
  • ✓ يعمل بالكامل في المتصفح — لا تُرسل بيانات إلى أي خادم.

الميزات والمواصفات

أقصى حجم للملف
حتى 100 ميغابايت
الخصوصية
تُحذف الملفات بعد نحو ساعة
السعر
مجاني، بدون تسجيل
المعالجة
100% على الجهاز
المعيار
HTML5 named character references
بياناتك لا تغادر متصفحك — كل المعالجة محلية.لا حاجة لحساب أو تسجيل.مجاني بلا حدود للاستخدام.

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

لماذا أحتاج إلى ترميز كيانات HTML؟

بدون الترميز، تُفسَّر أحرف مثل < و> كوسوم HTML مما يُخل بتخطيط الصفحة أو يُتيح هجمات البرمجة عبر المواقع (XSS). ترميز المحتوى المُقدَّم من المستخدم قبل إدراجه في HTML هو ممارسة أمنية أساسية.

ما الفرق بين كيانات HTML المُسمَّاة والرقمية؟

تستخدم الكيانات المُسمَّاة اسمًا مقروءًا للبشر: &amp; لـ &، و&lt; لـ <. تستخدم الكيانات الرقمية نقطة كود Unicode عشرية (&#38;) أو سداسية (&#x26;). كلاهما يُعرض بشكل متطابق في المتصفحات.

هل تتعامل هذه الأداة مع نطاق Unicode الكامل؟

نعم. يمكن ترميز أي حرف خارج نطاق ASCII القابل للطباعة ككيان HTML رقمي. يُطبق المُشفِّر الكيانات المُسمَّاة حيث يوجد اسم معياري ويعود إلى الترميز الرقمي لسائر الأحرف.

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

ترميز HTML يُهرّب الأحرف للإدراج الآمن في ترميز HTML. ترميز URL يُهرّب الأحرف للاستخدام الآمن في URL. يستخدمان تسلسلات هروب مختلفة وينطبقان على سياقات مختلفة.

HTML Entities vs. URL Encoding vs. JavaScript String Escaping

Each encoding layer has its own rules and applies to a different context. HTML entities protect markup structure; URL encoding protects URI syntax; JavaScript string escaping protects script literals. Applying HTML entities to a URL or JavaScript string will produce broken output. When building a link with dynamic content inside an HTML attribute, you often need both URL encoding (for the href value) and HTML entity encoding (for the attribute quotes) applied in the correct order.

أداة ترميز/فك ترميز كيانات HTML من FileCrank تُهرّب وتُزيل هروب الأحرف الخاصة في HTML، مع دعم الكيانات المُسمَّاة والرقمية عبر نطاق Unicode الكامل، بالكامل في متصفحك.

Advertisement

Ad