Base64 Decode
Decode Base64 encoded strings back to plain text instantly.
Free online Base64 encoder. Convert text, strings, and ASCII to Base64 format instantly. Supports Unicode and special characters. Everything runs client-side.
Base64 solves a very specific problem: moving arbitrary bytes through a channel that only accepts printable text. The trick is to stop thinking in bytes and start thinking in 6 bit chunks. Twenty-four bits divide evenly by both 8 and 6, so the encoder reads the input three bytes at a time (24 bits), slices that block into four groups of 6 bits, and turns each group into one character from a fixed 64 character alphabet.
Because three input bytes always become four output characters, the result is exactly four thirds the original size, an increase of roughly 33 percent before padding and line breaks are counted. That overhead is the price of safe transport, and it is why you should encode only when the destination genuinely cannot carry raw bytes.
The word Man is three ASCII characters, so it forms exactly one complete 24 bit block with nothing left over. That makes it the cleanest possible demonstration.
Result: Man encodes to TWFu, three bytes in, four characters out, no padding needed.
Real input rarely has a length that is a multiple of three. When the final block is short, the encoder pads the remaining bits with zeros, emits the characters it can, and then appends equals signs so the output length stays a multiple of four. Decoders use that count to work out how many bytes to throw away.
You will never see three equals signs in valid Base64, because a leftover of three bytes is simply a full block. A single stray equals sign in the middle of a string is a reliable sign that two encoded values were concatenated by mistake.
The related confusion is with hashing. A hash such as SHA-256 is one way and cannot be reversed, while Base64 is fully reversible by design. Choosing the wrong one is one of the most common security mistakes in application code.
Every 6 bit group produces a value between 0 and 63, and that value is looked up in the table below. RFC 4648 fixes this ordering: uppercase letters first, then lowercase, then digits, then the plus and slash characters. The padding character (=) is not part of the alphabet, it only marks the end of an incomplete group.
| Index | Char |
|---|---|
| 0 | A |
| 1 | B |
| 2 | C |
| 3 | D |
| 4 | E |
| 5 | F |
| 6 | G |
| 7 | H |
| 8 | I |
| 9 | J |
| 10 | K |
| 11 | L |
| 12 | M |
| 13 | N |
| 14 | O |
| 15 | P |
| Index | Char |
|---|---|
| 16 | Q |
| 17 | R |
| 18 | S |
| 19 | T |
| 20 | U |
| 21 | V |
| 22 | W |
| 23 | X |
| 24 | Y |
| 25 | Z |
| 26 | a |
| 27 | b |
| 28 | c |
| 29 | d |
| 30 | e |
| 31 | f |
| Index | Char |
|---|---|
| 32 | g |
| 33 | h |
| 34 | i |
| 35 | j |
| 36 | k |
| 37 | l |
| 38 | m |
| 39 | n |
| 40 | o |
| 41 | p |
| 42 | q |
| 43 | r |
| 44 | s |
| 45 | t |
| 46 | u |
| 47 | v |
| Index | Char |
|---|---|
| 48 | w |
| 49 | x |
| 50 | y |
| 51 | z |
| 52 | 0 |
| 53 | 1 |
| 54 | 2 |
| 55 | 3 |
| 56 | 4 |
| 57 | 5 |
| 58 | 6 |
| 59 | 7 |
| 60 | 8 |
| 61 | 9 |
| 62 | + |
| 63 | / |
Working on something related? Browse every free developer tool on the site, including a Base64 decoder, JSON to Base64, URL encoder, and hash generators. Everything runs entirely in your browser, so nothing you paste is ever uploaded.
Base64 encoding was designed to allow binary data to travel through systems that only handle plain text. The RFC 4648 standard defines the canonical Base64 alphabet and padding rules. Each group of 6 bits from the input is mapped to one of 64 printable characters. This tool encodes your input as UTF-8 bytes first, so any Unicode text including emoji and non-Latin scripts encodes correctly. The output is standard Base64 compatible with atob() in browsers, the base64 module in Python, and any compliant library.