Base 64
Base64 is a group of binary-to-text encoding schemes that represent binary data (more specifically, a sequence of 8-bit bytes) in an ASCII string format by translating it into a radix-64 representation. The term "Base64" originates from a specific MIME content transfer encoding.
Overview[edit | edit source]
Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This encoding helps to ensure that the data remains intact without modification during transport. Base64 is used commonly in a number of applications including email via MIME, and storing complex data in XML or JSON.
Encoding Process[edit | edit source]
The Base64 encoding process represents binary data in an ASCII string format by converting it into a base-64 representation. The specific set of 64 characters chosen to represent the 64 place-values for the base varies between implementations. The general rule is to choose a set of 64 characters that is both part of a subset common to most encodings and also printable. This combination leaves the data less likely to be modified in transit through systems, such as email, that were traditionally not 8-bit clean. The Base64 index table is as follows:
Value | Character |
---|---|
0–25 | A–Z |
26–51 | a–z |
52–61 | 0–9 |
62 | + |
63 | / |
Padding[edit | edit source]
The output of the encoding process is a multiple of 4 bytes. If the input data is not a multiple of 3 bytes, padding characters are added to the output to ensure its length is a multiple of 4. The padding character is "=".
Applications[edit | edit source]
Base64 is widely used in various applications including:
- Email via MIME encoding
- Embedding binary data in XML or JSON
- Storing complex data in databases
- Data URL scheme in HTML
Related Pages[edit | edit source]
See Also[edit | edit source]
Search WikiMD
Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD
WikiMD's Wellness Encyclopedia |
Let Food Be Thy Medicine Medicine Thy Food - Hippocrates |
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
WikiMD is not a substitute for professional medical advice. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.
Contributors: Prab R. Tumpati, MD