Base64 Chunker
Paste a Base64 string or upload a file, choose a chunk size, and get a validated numbered chunk set ready for reassembly — with zero server uploads.
Updated
All processing happens in your browser. Nothing is uploaded.
How to use Base64 Chunker
The Base64 Chunker splits any Base64-encoded string — or any file you upload — into fixed-size numbered chunks with embedded sequence metadata. Each chunk carries its index and total so a downstream consumer can detect gaps, reassemble out-of-order arrivals, or apply per-chunk integrity checks without needing a side-channel manifest. Chunked output is available as a JSON array or a compact line format, both fully parseable by the companion Base64 Reassembler. All encoding and splitting happen in your browser; files never leave your device.
- Paste a Base64 string into the input field, or switch to "Upload file" and drop any file up to 10 MB.
- Select the output format — "JSON array" for structured consumers or "Line format" for line-oriented transports.
- Choose a chunk size preset (256 – 8 192 characters) or click "Custom" and enter your own size.
- Click "Split into chunks" to produce the numbered chunk set.
- Review the stat panel (total chars, chunk count, last-chunk size), then copy the output or download it as a file.
- Paste the output into the Base64 Reassembler to verify sequence integrity before sending.
Your data never leaves your device — 100% private processing.
Why chunk Base64 strings for transport?
Many messaging systems impose strict per-message payload limits — MQTT brokers default to 256 KB, SMS gateways typically cap at a few hundred bytes, and some HTTP APIs enforce request body limits to protect against oversized inputs. When a file or binary blob needs to pass through one of these transports, it is first encoded to Base64 (which makes it text-safe at a 33 % size cost) then split into segments small enough for the channel. Each segment carries a sequence number and total so the receiver can detect missing parts, reassemble fragments arriving out of order, and refuse to process a partially-delivered payload. This tool automates the splitting and numbering step, producing output in either a JSON format that structured consumers can parse directly or a compact line format convenient for plain-text transports.
| Transport | Suggested chunk size | Reason |
|---|---|---|
| MQTT (default broker limit) | 512 – 4 096 chars | Typical broker max is 256 KB; large payloads need splitting |
| SMS / messaging gateway | 256 chars | SMS segment is 160 chars; short chunks keep parts under limit |
| HTTP multipart upload | 4 096 – 8 192 chars | Large chunks reduce part count while staying under API limits |
| WebSocket message | 1 024 – 4 096 chars | Avoids buffering large frames on low-memory devices |
| OTA firmware update (IoT) | 256 – 1 024 chars | Flash write pages are typically 256 – 512 bytes |
JSON vs line format: choosing the right output
The JSON array format encodes each chunk as an object with three keys — "index" (1-based position), "total" (overall chunk count), and "data" (the Base64 characters for this segment). This structure is ideal for programmatic consumers: any JSON parser can iterate the array, access named fields, and add extra fields (like a per-chunk checksum) without breaking parsers that ignore unknown keys. The line format writes one chunk per line as "b64chunk:<index>/<total>:<data>", which is more compact and suits line-oriented consumers such as shell scripts, log parsers, and serial-port transports. Both formats carry full sequence information so the Base64 Reassembler can validate and rebuild the original string from either one. Use JSON when the receiver already works with structured data, and line format when you need minimal overhead or human-readable progress.
Worked examples
Split a Base64 PNG for MQTT transport
Inputs: 4 000-char Base64 PNG, chunk size 512
Result: 8 chunks · 512 chars each (last chunk may be shorter)
Chunk a PDF for multi-part HTTP upload
Inputs: 20 000-char PDF Base64, chunk size 4 096
Result: 5 chunks · JSON array with index 1–5, total 5
Glossary
- Base64 chunk
- A fixed-size substring of a Base64 string, tagged with a sequence index and total count so receivers can validate completeness and order.
- Sequence metadata
- The index and total fields attached to each chunk — they are the minimal information needed to detect missing or duplicate parts and reassemble in order.
- JSON array format
- An output format where each chunk is a JSON object with "index", "total", and "data" fields, wrapped in a top-level JSON array.
- Line format
- A compact output format writing one chunk per line as "b64chunk:<index>/<total>:<data>", suitable for line-oriented transports and shell scripts.
- Chunk size
- The maximum number of Base64 characters (not bytes) in each segment. The last chunk may be shorter if the total length is not evenly divisible.
Related reading
Frequently Asked Questions
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Why use Base64 Chunker?
- Split Base64 strings of any size into precisely sized numbered chunks in one click
- Choose from presets (256, 512, 1 024, 4 096, 8 192 chars) or enter a custom chunk size
- JSON array and line-format outputs suit different downstream consumers and transports
- Upload any file up to 10 MB — the tool encodes it to Base64 and chunks it automatically
- Companion tool Base64 Reassembler validates and rebuilds the original string end-to-end
Common use cases
- Break a large Base64-encoded PDF into chunks that fit within an SMS, push notification, or IoT MQTT message limit
- Split a Base64 image payload into parts for a multi-step wizard that submits one chunk per HTTP request
- Generate a numbered chunk set to test a queue consumer's ability to handle out-of-order delivery
- Divide a firmware image encoded as Base64 into fixed-size OTA update segments for embedded devices
Related Developer Tools
Base64 Reassembler
Paste numbered Base64 chunks (JSON or line format) to validate order, detect corruption, and rebuild the original Base64 string with clear per-chunk errors.
Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 strings back to text. Fast, free, and runs entirely in your browser.
Base64 Payload Extractor
Paste a JSON body, HTML source, or any text and automatically extract all embedded base64 data URIs. Preview, inspect, and download each artifact — fully in-browser.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Includes syntax highlighting, error detection, and a collapsible tree view — free, private, in-browser.
Regex Tester
Test and debug regular expressions online. See live matches, capture groups, and replace output. Free, private, instant.
URL Encoder / Decoder
Encode and decode URLs and URL components online. Convert special characters to percent-encoding and back instantly — free, private, and fast.
Explore all Developer Tools.