Base64 Encode
Convert text and strings to Base64 format instantly.
Free online Base64 decoder. Convert Base64 encoded strings back to plain text instantly. Handles standard and URL-safe Base64. All processing in your browser.
Decoding runs the encoding pipeline backwards. Each Base64 character is looked up in the 64 character alphabet to recover the 6 bit value it represents. Four of those values are concatenated into a 24 bit block, and that block is sliced back into three 8 bit bytes. Padding at the end tells the decoder how many of those bytes are real.
This string has eight characters, one of which is padding, so it decodes to five bytes rather than six.
Base64 is strict about shape, and most failures come from a handful of causes:
Standard Base64 uses plus and slash for indexes 62 and 63. Both are awkward in a URL: slash is a path separator and plus means a space in form encoded data. RFC 4648 section 5 therefore defines a URL and filename safe variant.
JSON Web Tokens always use the URL-safe form without padding, which is why a JWT segment pasted into a strict standard decoder often fails. Convert dash to plus, underscore to slash, and pad the length up to a multiple of four before decoding.
Base64 carries no type information, so the decoder cannot tell you what the bytes mean. If the result renders as readable words or valid JSON, it was text, almost always UTF-8. If you see replacement characters, control codes, or unprintable symbols, the payload was binary. A short signature at the start is often enough to identify it: bytes 89 50 4E 47 mean PNG, FF D8 FF means JPEG, 25 50 44 46 means PDF, and 50 4B 03 04 means a ZIP archive (which includes .docx and .xlsx files).
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 encoder, JWT decoder, URL decoder, and JSON formatter. Everything runs entirely in your browser, so nothing you paste is ever uploaded.
Base64 decoding is the inverse of encoding: it converts a Base64 string back into the original binary data or human-readable text. The process reads 4 Base64 characters at a time, extracts the 24 bits they represent, and writes 3 bytes of output. This decoder handles both standard Base64 (RFC 4648 Section 4) and URL-safe Base64 (RFC 4648 Section 5) automatically, accepting either + and / or - and _ as the special characters. It also handles inputs with missing padding, which is common in JWT tokens and certain API responses.