Convert your Base64 string to its original form
Use this free online tool to decode your Base64 encoded strings into its original form. Fast, secure, and easy to use. No registration or installation required.
Base64 Decoder - Convert Base64 encoded strings to the original form instantly
Base64 decode
The Base64 Decoder is a simple and efficient online tool that converts Base64-encoded strings into its not encoded form (the original one). Base64 decoding is commonly used to decode data after a transmittion in formats that require text-based representations, such as JSON, XML, or URL parameters.
How Decoding Works
Base64 decoding reverses the encoding process, converting the encoded ASCII characters back into their original binary form. This ensures that the original data can be accurately retrieved after transmission through text-based protocols. The decoding process follows these fundamental principles:
- It maps each encoded character back to its corresponding binary value based on the predefined Base64 table.
- The decoded output reconstructs the original data by grouping bits together in their original form.
- Padding characters (=) at the end of the encoded string are removed to correctly restore the original data size.
- The result is a faithful restoration of the raw input, making it usable in its intended format.
Af per the encoding process, different implementations are possible. As an example "RFC 4648" defines the characters set as only letters (A-Z, a-z) and numbers (0-9) for the first 62 characters, and plus (+) and slash (/) symbols as last 2 characters - padding equal symbol (=) is used when necessary. "RFC 4648 / Base64URL" variant differs from the previous one for the last 2 character. It uses minus (-) and underscore (_) as they are URL safe.
Common Use Cases
-
Data Transmission & Storage
- Ensures safe transmission of binary data over text-based protocols like email (MIME) and HTTP.
- Stores binary files (e.g., images, PDFs) as text in JSON, XML, or databases.
-
Encoding Credentials & Tokens
- Used in Basic Authentication headers (
Authorization: Basic <Base64-encoded credentials>). - Encodes API keys, session tokens, and other authentication-related data.
- Used in Basic Authentication headers (
-
Embedding Binary Data in Text-Based Formats
- Converts images, audio, or documents into a text format for inclusion in HTML, CSS, or JavaScript.
- Used in Data URLs (
data:image/png;base64,...) to embed media directly in web pages.
-
Serialization & Data Persistence
- Stores binary data in text-friendly formats when serializing data in JSON, YAML, or XML.
- Helps when transferring structured data across different systems.
-
Cryptography & Hashing
- Encodes cryptographic signatures, certificates, and keys (e.g., PEM format for SSL certificates).
- Stores and transmits hashed or encrypted data safely.
-
Avoiding Special Character Issues
- Ensures safe encoding of binary or special characters that might get corrupted in URLs, cookies, or command-line arguments.
- Prevents character encoding issues in legacy systems or different text encodings.
While Base64 is useful for encoding and transmission, it's not encryption—it provides no security and can be easily reversed through decoding.
How to Use
This tool ensures quick and reliable Base64 decoding, making it a must-have utility for developers working with data serialization, APIs, or web applications.
The conversion process (decoding)
To convert a Base64 encoded string into its original format we need to follow the opposite process used for the encoding. The process' steps are the following and represent the Base64 decoding algorithm:
Let's have a pratical example. For example decode the string RmF0aGVy.
| Encoded string | RmF0aGVy | |||||||||||||||||||||||||||||||||||||||||||||||
| Base64 characters | R | m | F | 0 | a | G | V | y | ||||||||||||||||||||||||||||||||||||||||
| Index | 17 | 38 | 5 | 52 | 26 | 6 | 21 | 50 | ||||||||||||||||||||||||||||||||||||||||
| Binary | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
| ASCII | 70 | 97 | 116 | 104 | 101 | 114 | ||||||||||||||||||||||||||||||||||||||||||
| Original | F | a | t | h | e | r | ||||||||||||||||||||||||||||||||||||||||||
Obtaining the Father string like in the famous phrase:
I am your Father
Base64 table from RFC 4648
| Index | ASCII |
|---|---|
| 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 | ASCII |
|---|---|
| 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 | ASCII |
|---|---|
| 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 | ASCII |
|---|---|
| 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 | / |
- Padding note: if you want to see a Base64 un-conversion example with padding look at the italian version of this page.