ترميز / فك ترميز Base64
أداة مجانية عبر الإنترنت لترميز وفك ترميز Base64. تدعم تحويل النصوص، وتحميل الملفات إلى Data URI، ووضع URL Safe. تتم جميع العمليات داخل متصفحك — ولا تغادر بياناتك جهازك أبدًا.
النص المدخل
نتيجة Base64
ما هو 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
| القيمة | تشار | القيمة | تشار | القيمة | تشار | القيمة | تشار | |||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | A | 16 | Q | 32 | g | 48 | w | |||
| 1 | B | 17 | R | 33 | h | 49 | x | |||
| 2 | C | 18 | S | 34 | i | 50 | y | |||
| 3 | D | 19 | T | 35 | j | 51 | z | |||
| 4 | E | 20 | U | 36 | k | 52 | 0 | |||
| 5 | F | 21 | V | 37 | l | 53 | 1 | |||
| 6 | G | 22 | W | 38 | m | 54 | 2 | |||
| 7 | H | 23 | X | 39 | n | 55 | 3 | |||
| 8 | I | 24 | Y | 40 | o | 56 | 4 | |||
| 9 | J | 25 | Z | 41 | p | 57 | 5 | |||
| 10 | K | 26 | a | 42 | q | 58 | 6 | |||
| 11 | L | 27 | b | 43 | r | 59 | 7 | |||
| 12 | M | 28 | c | 44 | s | 60 | 8 | |||
| 13 | N | 29 | d | 45 | t | 61 | 9 | |||
| 14 | O | 30 | e | 46 | u | 62 | + | |||
| 15 | P | 31 | f | 47 | v | 63 | / |
+ becomes -, / becomes _, and trailing = is removed, making the result directly usable in URLs without additional encoding.