This is a Base64 online encoder. Use this tool to convert data to the Base64 format.

Base64-Encode.Online

Encoding of the source text.
Was it useful?

Share this tool with the world.

About Base64-Encode.Online

Base64-Encode.Online is a free web application for converting data to Base64 format. In accordance with UNIX philosophy, this online tool is designed to do one thing only and do it well - encode data to Base64.

Write programs that do one thing and do it well.

Currently, this tool can be used to encode to Base64 textual data only, but in the nearest future it could be used to encode binary files (images, PDF documents, etc.) as well.

How it works

Basically, the Base64 encoding is the process of encoding the binary data into a "printable" ASCII character set. The textual data firstly should be converted into the binary format.

The encoder converts the textual data into the binary using the Python's string.encode() method. Then it encodes this binary data to Base64 using the base64.standard_b64encode(). Finally it decodes the Base64 binary string back to the textual format using the base64_bytes.decode() method and displays the result in the text area above.

Advanced options

Character set
To encode textual data ('str' object) to Base64, firstly it should be converted to the binary format ('bytes' object) by calling the string.encode() method. By default, Base64-Encode.Online uses the UTF-8 character set. If you want to convert the input textual data to another character set before encoding it to Base64, you can change the character set using this option. The data encoded to Base64 doesn't contain information about the character set, so to decode it from Base64 you may have to specify the character set selected during encoding.

Guaranteed security

All communications with Base64-Encode.Online are secured with SSL protocol (HTTPS). Both your browser and our servers encrypt all traffic before sending any data. We do not store or inspect the contents of the entered data or uploaded files in any way.

Completely free

You don’t have to pay anything. All the features of this web application are accessible free of charge.

About Base64 Encoding

The Base64 encoding is the process of encoding binary data into a "readable" string. It allows to encode arbitrary bytes to bytes which are known to be safe to send without getting corrupted. Thanks to it, you can convert Chinese characters, emoji and even images and PDF documents into a "readable" string, which can be saved or transferred anywhere.

The Base64 encoding is commonly used when there is a need to store or transmit the binary data over systems that are designed to deal with ASCII, e.g. email via MIME. The Base64 alphabet consists of the ASCII alphanumeric character set and a couple of symbols.

The Base64 encoding table
IndexBinaryChar.
0 000000A
1 000001B
2 000010C
3 000011D
4 000100E
5 000101F
6 000110G
7 000111H
8 001000I
9 001001J
10001010K
11001011L
12001100M
13001101N
14001110O
15001111P
Padding=
IndexBinaryChar.
16010000Q
17010001R
18010010S
19010011T
20010100U
21010101V
22010110W
23010111X
24011000Y
25011001Z
26011010a
27011011b
28011100c
29011101d
30011110e
31011111f
IndexBinaryChar.
32100000g
33100001h
34100010i
35100011j
36100100k
37100101l
38100110m
39100111n
40101000o
41101001p
42101010q
43101011r
44101100s
45101101t
46101110u
47101111v
IndexBinaryChar.
48110000w
49110001x
50110010y
51110011z
521101000
531101011
541101102
551101113
561110004
571110015
581110106
591110117
601111008
611111019
62111110+
63111111/

The Base64 encoding process

The Base64 encoding scheme is described in RFC 3548. The Base64 encoding takes the original binary data and devides it into chunks of 3 bytes. A byte consists of 8 bits, so Base64 takes 24 bits in total. These 3 bytes are then converted into 4 "printable" ASCII characters from the table above.

The disadvantage is that the message encodeed using the Base64 algorithm increases its length - every 3 bytes of data are encoded to 4 ASCII characters (a ~33% increase).

Example

The Base64-encoded value of "Harry Potter" is SGFycnkgUG90dGVy.

SourceText (ASCII)Harry<space>Potter
Octets72971141141213280111116116101114
Bits010010000110000101110010011100100111100100100000010100000110111101110100011101000110010101110010
Base64 encodedIndex1865502839363220661502962150
CharacterSGFycnkgUG90dGVy

Encoded in ASCII, the characters H, a, r, r, y, <space>, P, o, t, t, e, r are stored as the decimal values: 72, 97, 114, 114, 121, 32, 80, 111, 116, 116, 101, 114.

These ASCII values can be represented in 8-bit binary as follows:

01001000 01100001 01110010 01110010 01111001 00100000 01010000 01101111 01110100 01110100 01100101 01110010

Joined together, they constitute a binary stream of:

010010000110000101110010011100100111100100100000010100000110111101110100011101000110010101110010.

The Base64 encoding starts from chunking this binary stream into groupings of six characters:

010010 000110 000101 110010 011100 100111 100100 100000 010100 000110 111101 110100 011101 000110 010101 110010

Each of these groupings translates into the numbers: 18, 6, 5, 50, 28, 39, 36, 32, 20, 6, 61, 50, 29, 6, 21 50.

Finally, these numbers can be converted into the ASCII characters using the Base64 encoding table: S, G, F, y, c, n, k, g, U, G, 9, 0, d, G, V, y.

Partner Sites