Logo

MonoCalc

/

Base64 Chunk Decoder

Encode/Decode
Paste your Base64 chunks — one per line (or use a custom delimiter below)

About This Tool

🔓 Base64 Chunk Decoder – Reassemble & Decode Split Payloads

The Base64 Chunk Decoder is a browser-based utility designed to decode Base64-encoded data that has been split into multiple segments. Large binary files, API payloads, MIME email attachments, and database blobs are frequently transmitted or stored in chunks — this tool reassembles them and decodes the entire result in one step.

Why Does Chunking Matter?

Many systems impose limits on string length, HTTP header size, JSON field size, or email line length. Protocols like SMTP (RFC 2045) recommend line-wrapping Base64 at 76 characters; REST APIs may split binary responses across multiple pages; some databases store large values in fixed-size text columns. Attempting to decode each segment individually causes padding-boundary errors — Base64 is a 3-byte-in/4-char-out encoding that only produces valid output when the total input length is a multiple of 4. This tool concatenates all chunks first, then decodes the combined string, completely avoiding those errors.

How the Decoder Works

The decoding pipeline follows these steps:

  1. Split – the input is divided at the chosen delimiter (newline, comma, semicolon, pipe, or a custom string).
  2. Sanitize – optional whitespace stripping removes spaces, tabs, and embedded newlines from each chunk; optional label stripping removes index prefixes such as chunk_1: or part-2:.
  3. Normalise – if URL-safe Base64 is selected, - is replaced with + and _ with / per RFC 4648 §5.
  4. Pad – the concatenated string is padded to the next multiple of 4 characters by appending = characters as needed.
  5. Decode – the browser's native atob() converts the Base64 string into a Uint8Array, then a TextDecoder renders it as UTF-8 text (or the raw bytes are offered for binary/hex output).

Output Modes

📝 Text (UTF-8)

The decoded bytes are rendered as a UTF-8 string. Ideal for JSON, XML, HTML, CSV, source code, or any human-readable content transmitted in Base64.

🔢 Hex Dump

Each decoded byte is displayed in a two-column hex/ASCII grid (16 bytes per row) — the canonical format used by tools like xxd and hexdump. Invaluable for debugging binary protocols, inspecting file magic bytes, or verifying data integrity.

💾 Binary Download

The decoded Uint8Array is wrapped in a Blob and offered as a file download. Use this to reconstruct images, PDFs, ZIPs, or any other binary file that was split and Base64-encoded for transport.

Quick-Start Example

Suppose a chunked API response delivers a file in three segments, each on its own line:

SGVsbG8g
V29ybGQh

Set Delimiter to Newline, Output to Text, then click Decode. The tool concatenates the two chunks into SGVsbG8gV29ybGQh, fixes padding, and decodes it to Hello World!.

Byte-Size Formula

The number of bytes in a decoded Base64 string can be estimated with:

bytes = ⌊ base64Length × 3 / 4 ⌋ − paddingChars

For example, SGVsbG8gV29ybGQh (16 chars, 0 padding) decodes to ⌊16 × 3 / 4⌋ = 12 bytes — exactly “Hello World!” in ASCII.

Standard vs URL-Safe Base64

Standard Base64 (RFC 4648 §4) uses + and /, which can conflict with URLs and HTTP headers. URL-safe Base64 (RFC 4648 §5) replaces them with - and _, making encoded strings safe for query strings, JWT tokens, and OAuth payloads. Enable the URL-safe variant option when your chunks come from JWTs or web API responses.

Privacy & Security

All processing happens entirely in your browser. No data is transmitted to any server. This makes the tool safe for confidential payloads such as encrypted files, private certificates, or sensitive API data — your input never leaves your device.

Common Use Cases

  • Reconstructing large files from chunked REST API responses
  • Decoding multi-part Base64 MIME email attachments
  • Reassembling Base64 blobs split across database records or log files
  • Debugging Base64 data pipelines and verifying chunk boundaries
  • Decoding JWT payload segments for inspection
  • Inspecting binary file headers after Base64 transport

Frequently Asked Questions

Is the Base64 Chunk Decoder free?

Yes, Base64 Chunk Decoder is totally free :)

Can I use the Base64 Chunk Decoder offline?

Yes, you can install the webapp as PWA.

Is it safe to use Base64 Chunk Decoder?

Yes, any data related to Base64 Chunk Decoder only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Base64 Chunk Decoder work?

The tool accepts multiple Base64-encoded segments separated by a delimiter (newline, comma, semicolon, pipe, or custom string). It concatenates all chunks into a single Base64 string, repairs any missing padding, then decodes the combined result as UTF-8 text, a hex dump, or a binary file download — all entirely in your browser.

Why do I need to decode Base64 in chunks instead of all at once?

Large Base64 payloads are often split into chunks for transmission over APIs, email (MIME parts), database fields, or log pipelines that impose size limits. Decoding each chunk individually causes padding-boundary errors; this tool reassembles the chunks first, ensuring correct output.

What delimiters are supported for separating chunks?

You can split chunks by newline (default), comma, semicolon, pipe character, or any custom string you type in. The tool also supports stripping optional index labels (e.g. 'chunk_1:') that some pipelines prepend to each segment.

What output formats are available?

Three output modes are available: Text (UTF-8 string in a scrollable area), Hex Dump (byte-level view with 16 bytes per row showing hex and ASCII), and Binary (decoded bytes offered as a downloadable file). Switch modes at any time without re-entering your input.

How accurate is the decoder?

The tool uses the browser-native atob() function combined with a Uint8Array pipeline for binary safety. Auto-padding correction appends the necessary '=' characters so that minor encoding artefacts do not cause failures. Invalid Base64 characters are flagged with a per-chunk warning.

Does any data leave my browser?

No. All decoding is performed entirely client-side in your browser using JavaScript. No data is sent to any server, making the tool safe for sensitive or confidential payloads.