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) : Informatics, Character Encoding

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Base64 Coding tool. Thank you.

# Base64 Coding

## Base64 Encoder

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.

### How to encrypt using Base64 coding

Decryption uses binary values of the text (depending on the coding table).

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

Coding consists in 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+/'

Example: Binary to Base 10 conversion gives 25 4 13 47 25 6 20

Example: In the alphabet, 25 corresponds to Z, 4 corresponds to E, etc. You get ZENvZGU.

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

Example: ZENvZGU becomes ZENvZGU=

### How to decrypt Base64 coding

Decryption consists in finding back values of the letters in the Base64 alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'

Example: Consider the coded message ZENvZGU=

Example: Corresponding values are: 25,4,13,47,25,6,20 (equal sign = is ignored)

Values are converted to 6-bit binary.

Example: 011001,000100,001101,101111,011001,000110,010100

Binary text is then read using the desired coding system (ASCII, Unicode, etc.)

>In ASCII, 01100100,01000011,01101111,01100100,01100101,00 (remaining bits, here the two final 0 are ignored)

Example: The plain text is DCODE (in ASCII).

### How to recognize an Base64 ciphertext?

The message has a maximum of 65 distinct characters. By default it is: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=

### Why data size is increasing?

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

### 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