Advanced Options
Newline Separator
Different operating systems use distinct newline characters—Unix and Windows systems, for example, do not share the same line break symbols. After decoding, any newline characters in your output will be replaced by the option you select. This setting determines how the "decode each line separately" feature behaves.
Decode Each Line Separately
With this option enabled, each line of input will be treated as a separate Base64 string and decoded independently. This is particularly useful when you need to decode multiple, distinct Base64 entries that are separated by line breaks.
Remove Line Breaks
Base64 data in MIME format (e.g. from emails) often includes line breaks every 76 characters. Enable this option to remove these line breaks before decoding. This ensures proper decoding of MIME-formatted Base64 data.
Handle URL-safe Encoding
Enable this option if your input uses URL-safe Base64 variant (RFC 4648 / Base64URL) where "-" represents "+", "_" represents "/", and padding may be omitted. This option will convert the input back to standard Base64 before decoding.
Live Mode
When Live Mode is turned on, your input is decoded instantly using your browser's built-in JavaScript functions—without transmitting any data to our servers. Please note that this mode currently supports only UTF-8 text output.
Note: For binary files (images, documents, etc.), make sure to save the output rather than copying it to prevent data corruption.
What is Base64 decoding?
Base64 decoding reverses the Base64 binary-to-text encoding scheme, converting an ASCII string back into the exact byte sequence that originally produced it. Base64 uses a fixed 64-character alphabet — the uppercase letters A–Z, the lowercase letters a–z, the digits 0–9, and the two symbols + and / — plus = as a trailing padding character. The format is defined by RFC 4648 §4, which also describes the URL-safe variant Base64URL that substitutes - and _ for + and /. Encoding maps every three input bytes (24 bits) to four Base64 characters (4 × 6 bits), so the encoded output is always about 33% longer than the original. Decoding inverts that ratio: a JWT payload, a MIME-encoded email attachment, or an inline data: URI all return to their original bytes through the same exact reversal.
How does Base64 decoding work?
Base64 decoding mechanically inverts the encoding pipeline. The decoder reads four Base64 characters at a time, looks each one up in the 64-character alphabet to recover its 6-bit value, concatenates the four 6-bit values into a single 24-bit buffer, and then splits that buffer back into three 8-bit bytes. Trailing = padding signals that the final group decodes to only two bytes (one =) or one byte (two =). The canonical worked example is the Base64 string TWFu, which decodes to the three-letter ASCII word Man. Following the algorithm: T is alphabet index 19 → 010011; W is index 22 → 010110; F is index 5 → 000101; u is index 46 → 101110. Concatenated, those bits form 010011 010110 000101 101110, which regroups into the byte sequence 01001101 01100001 01101110 — the ASCII codes for M, a, n.
- Validate the input string against the 64-character alphabet and the padding rules, rejecting any stray whitespace or non-alphabet characters that survived transport.
- Translate every Base64 character into its 6-bit value using a lookup table (or its position in
A–Z a–z 0–9 + /). - Concatenate the 6-bit values four at a time into 24-bit buffers.
- Split each 24-bit buffer back into three 8-bit bytes, which become the original binary or ASCII data.
- Honor trailing
=padding by dropping one or two bytes from the final group as required.
Why use a Base64 decoder?
- Data recovery: Retrieve the original binary bytes from any text-safe Base64 payload before further processing. For example, decode a database column that stored a PDF receipt as Base64 so the bytes can be written back to disk and reopened.
- Email attachments: Extract files and images from MIME-encoded message bodies that wrap binary parts as Base64 lines. A typical case is pulling a PNG out of a
Content-Transfer-Encoding: base64block in a saved.emlfile when an attachment fails to download. - Web resources: Convert embedded
data:URIs back to their original bytes so you can inspect what a page actually shipped. For example, paste adata:image/svg+xml;base64,…URL from a CSS rule and recover the SVG markup to audit it. - API integration: Process Base64 payloads that REST and GraphQL services return when binary fields cannot travel as raw bytes. A common case is decoding a JWT signature, an OAuth refresh token, or an S3
Content-MD5header to verify a request end-to-end.
What are common applications of Base64 decoding?
Base64 decoding is essential in various scenarios including:
- Email processing: Pull attachments out of MIME-encoded messages without launching a full mail client. Engineers do this when triaging a malformed message in a support queue or recovering a file from an archived
.mboxexport where the original client is no longer installed. - Web development: Convert inline Base64
data:URIs back to their original bytes so the asset can be audited or replaced with a hashed file. This is routine when refactoring a stylesheet that embeds an icon asdata:image/svg+xml;base64,…. - API debugging: Decode Base64 fields inside JSON or XML responses so the underlying value is human-readable in logs. Typical examples include a JWT
payload, an S3ETagwrapping an MD5, or a webhook signature header echoed back from a third-party provider.
What does a Base64 decoding example look like?
The Base64 string TWFu when decoded becomes the word Man. The decoding process converts each Base64 character to its 6-bit value, combines these bits, and reconstructs the original ASCII characters.
Is this Base64 decoder free and private?
Yes — this Base64 decoder is completely free, requires no account or sign-up, and runs entirely inside your browser. When you paste a Base64 string or drop in a file, the decoding happens locally through standard JavaScript APIs (atob for text and FileReader plus a typed-array conversion for binary content). Your input never leaves your device, no copy of it is written to any server log, no telemetry is attached to the contents you decode, and there is no rate limit, character cap, or stored history. You can use the tool offline once the page has loaded, because the same code that runs on first visit is cached by the browser. We also avoid third-party analytics scripts that would read the form fields. That makes the tool safe for sensitive payloads such as JWT bearer tokens, credentials embedded in data: URIs, configuration secrets, and Base64-wrapped certificate or private-key material that you must not upload anywhere.
Our online Base64 decoder tool provides a fast and secure way to decode your Base64 data. Whether you're extracting embedded images from web pages or processing API responses, Base64 decoding is an essential tool for modern web development.