🔓 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:
- Split – the input is divided at the chosen delimiter (newline, comma, semicolon, pipe, or a custom string).
- Sanitize – optional whitespace stripping removes spaces, tabs, and embedded newlines from each chunk; optional label stripping removes index prefixes such as
chunk_1:orpart-2:. - Normalise – if URL-safe Base64 is selected,
-is replaced with+and_with/per RFC 4648 §5. - Pad – the concatenated string is padded to the next multiple of 4 characters by appending
=characters as needed. - Decode – the browser's native
atob()converts the Base64 string into aUint8Array, then aTextDecoderrenders 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
V29ybGQhSet 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 ⌋ − paddingCharsFor 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