ترميز / فك ترميز Base64

أداة مجانية عبر الإنترنت لترميز وفك ترميز Base64. تدعم تحويل النصوص، وتحميل الملفات إلى Data URI، ووضع URL Safe. تتم جميع العمليات داخل متصفحك — ولا تغادر بياناتك جهازك أبدًا.

النص المدخل

نتيجة Base64

الطول الأصلي: 0 أحرف طول الترميز Base64: 0 أحرف التوسع: الوضع: ترميز

ما هو Base64؟

Base64 is an encoding method that uses 64 printable characters to represent binary data. Since 2⁶=64, every 6 bits form a unit mapped to one printable character. Base64 is commonly used to transmit binary data in text-based protocols, such as Data URI in HTML/CSS and HTTP Basic Auth tokens.

كيف يعمل

During encoding, every 3 bytes (24 bits) are split into 4 groups of 6 bits each, mapped to a Base64 table character. If data is less than 3 bytes, = padding is used. Decoding reverses this process, converting each Base64 character back to 6 bits and reassembling the original data.

ملاحظات حول ترميز Base64:

  • Encoded data is about 33% larger than original (3 bytes → 4 chars)
  • Printable characters: A-Z, a-z, 0-9, +, /
  • May include 1 or 2 = padding characters at the end
  • ترميز قابل للعكس بالكامل (وليس تشفيرًا)

حالات الاستخدام الشائعة

  • معرّف URI للبيانات — Embed images, fonts and other binaries directly in HTML/CSS
  • المصادقة الأساسية عبر HTTP — Username and password transmitted via Base64 encoding
  • رمز JWT — Header and Payload of JSON Web Tokens use Base64 URL Safe encoding
  • رمز API — Many API keys use Base64 encoding for storage and transmission
  • مرفقات البريد الإلكتروني — MIME protocol uses Base64 for binary attachment transfer

جدول ترميز Base64

القيمةتشارالقيمةتشارالقيمةتشارالقيمةتشار
0A16Q32g48w
1B17R33h49x
2C18S34i50y
3D19T35j51z
4E20U36k520
5F21V37l531
6G22W38m542
7H23X39n553
8I24Y40o564
9J25Z41p575
10K26a42q586
11L27b43r597
12M28c44s608
13N29d45t619
14O30e46u62+
15P31f47v63/
نصيحة: When "URL Safe mode" is enabled, + becomes -, / becomes _, and trailing = is removed, making the result directly usable in URLs without additional encoding.