Search for a tool
Base64 Coding

Tool to decrypt/encrypt with base 64. Base64 is a coding system using 64 characters, selected to be compatible with a majority of coding tables. It is used with emails for example.

Results

Base64 Coding -

Tag(s) : Character Encoding, Internet

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our community Discord for help requests!


Thanks to your feedback and relevant comments, dCode has developped the best 'Base64 Coding' tool, so feel free to write! Thank you !

Base64 Coding

Base 64 Decoder










See also: Base32

Base64 Encoder


  [X]




See also: ASCII85 EncodingBase32

Tool to decrypt/encrypt with base 64. Base64 is a coding system using 64 characters, selected to be compatible with a majority of coding tables. It is used with emails for example.

Answers to Questions

How to encrypt using Base64 coding

Base 64 encoding requires a binary input. For a text, the values depend on its coding (often ASCII or Unicode).

Example: To code DCODE that is written 01100100 01000011 01101111 01100100 01100101 in binary (ASCII code)

Base 64 Coding starts by splitting the binary code in groups of 6 bits, filling it with 0 if needed.

Example: Split as 011001 000100 001101 101111 011001 000110 0101 (+00)

Each group of 6 bits has a base 10 value, it corresponds to a character in the Base 64 alphabet (start at 0): ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

A1B2C3D4E5F6G7H
8I9J10K11L12M13N14O15P
16Q17R18S19T20U21V22W23X
24Y25Z26a27b28c29d30e31f
32g33h34i35j36k37l38m39n
40o41p42q43r44s45t46u47v
48w49x50y51z520531542553
56457558659760861962+63/

Example: The conversion from 011001 to base 10 is 25 and in the alphabet 25 is Z, 000100 is 4, etc. to obtain the characters numbered 25 4 13 47 25 6 20 or the coded message: ZENvZGU

Base 64 only works with groups of 4 characters, if needed, fill with =.

Example: Finally ZENvZGU (that had 7 chars) becomes ZENvZGU= (8 chars, a multiple of 4) which is the final base64 encoded message.

How to decrypt Base64 coding

Decryption consists in finding back values of the letters in the Base64 alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ (equal sign = is ignored)

Example: A coded message is YjY0, corresponding values of Y,j,Y,0 in the alphabet are: 24,35,24,52

Values are converted to 6-bit binary.

Example: 24 is converted 011000, 35 = 100011, etc. the decoded binary message is 011000100011011000110100

Base64 decoding is then complete. Binary message is then read using the desired coding system (ASCII, Unicode, etc.)

Example: In ASCII, 01100010,00110110,00110100 corresponds to the plain text b,6,4

How to recognize an Base64 ciphertext?

The message is theoretically composed of a number of characters multiple of 4. To this end, the presence of characters = (equal) at the end of the message is a big clue.

The message has a maximum of 65 distinct characters (and possibly space or line break). By default it is: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=

Base64 is typically used in emails for non-ASCII messages and attachments (via the MIME standard: Multipurpose Internet Mail Extensions)

The Usenet network used Base64 to transfer files, any indication referring to it is a clue.

Why data size is increasing?

In Base64, 4 ASCII characters are used to code 3 bytes. Volume is increased by 33%.

Example: Base64 (6 characters) is coded QmFzZTY0 (8 characters or +33%)

base64 (no uppercase) is coded YmFzZTY0

Why Base64 is named like this?

The base64 uses a sixty-four character alphabet to code any binary string (in base 2), so it is a mathematical conversion to base 64.

What is Base64URL?

Characters 62 + and 63 / can cause problems with URL, they can be remplaced by respectively - and _. The equal = sign is deleted.

When Base64 have been invented ?

RFC 2045 norm officialising Base64 is from 1996

Source code

dCode retains ownership of the online 'Base64 Coding' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Base64 Coding download for offline use on PC, tablet, iPhone or Android !

Need Help ?

Please, check our community Discord for help requests!

Questions / Comments

Thanks to your feedback and relevant comments, dCode has developped the best 'Base64 Coding' tool, so feel free to write! Thank you !


Source : https://www.dcode.fr/base-64-encoding
© 2020 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
Feedback