Split & Merge Files
Split large files into smaller parts by size or line count, then merge them back. Supports ZIP download for split parts. All processing happens in your browser.
How to Use
Split any file into smaller parts by byte size or line count, then merge parts back into the original file. Everything runs in your browser using the File API — no data leaves your device.
How to split a file by size
- Select Split mode — this is the default mode when the tool loads. Use the mode toggle at the top to switch between Split and Merge.
- Drop or select your file. Any file type is accepted: archives, videos, disk images, databases, logs. There is no file type restriction.
- Choose "Fixed Size" from the split-by selector. Enter a chunk size and select the unit (KB, MB, or GB). Alternatively, click one of the quick presets: 1 MB, 5 MB, 10 MB, 25 MB, 50 MB, or 100 MB.
- Review the estimated parts count shown below the size input. This updates in real time as you adjust the chunk size.
- Click "Split File" to start processing. A progress bar tracks the operation. Splitting uses
File.slice()to extract each chunk without loading the entire file into memory. - Download individual parts using the download icon next to each part, or click "Download All as ZIP" to get every part in a single ZIP archive.
How to split a text file by line count
- Drop or select a text file — the tool reads it as UTF-8 text.
- Switch to "Line Count" using the split-by selector.
- Enter the number of lines per part (default is 1000). Each output file will contain exactly that many lines, except the last part which may have fewer.
- Click "Split File." The tool detects whether the file uses Unix (LF) or Windows (CRLF) line endings and preserves them in every output part.
- Download parts individually or as a ZIP.
How to merge files
- Switch to Merge mode using the mode toggle at the top.
- Add files by dragging them into the dropzone or clicking to browse. Add as many files as needed — each drop appends to the list.
- Arrange the order using the up and down arrow buttons next to each file. The merge concatenates files from top to bottom.
- Remove unwanted files by clicking the X button.
- Click "Merge Files" to concatenate all files into one. The tool reads each file in 1MB chunks, so merging large files stays memory-efficient.
- Download the merged file. The output filename is derived from the first file in the list, with any
.001suffix stripped.
About This Tool
How File.slice() enables efficient splitting
The browser's File.slice() method returns a lightweight Blob reference to a byte range within the file, without copying the data into memory. This means splitting a 2 GB file into 100 parts does not require 2 GB of RAM — each part is a zero-copy view into the original file. The actual bytes are only read when the user downloads a part or requests a ZIP archive. This is the same mechanism browsers use internally to handle multipart form uploads and Range requests for streaming video.
The HJSplit naming convention
Split parts follow the filename.ext.001, .002, .003 naming pattern. This convention originates from HJSplit, one of the earliest cross-platform file splitters (released in 2001). The format is simple: parts are raw byte chunks with no added metadata, and the numbering is zero-padded to three digits. Because there is no proprietary header, parts created by any tool that follows this convention are interchangeable — you can split here and merge with HJSplit, GSplit, or the Unix cat command.
Line ending detection and preservation
When splitting by line count, the tool reads the file as text and scans for the first line ending to determine whether it uses Unix-style LF (\n) or Windows-style CRLF (\r\n). This style is preserved in every output part. If the original file ends with a trailing newline, each intermediate part will also end with one, ensuring that concatenating all parts reproduces the original file byte-for-byte.
ZIP archive creation
The "Download All as ZIP" feature uses fflate, a high-performance pure JavaScript ZIP library that runs entirely in the browser. Parts are stored in the ZIP without additional compression (store mode), since the original file may already be compressed. This approach prioritizes speed — creating a ZIP of 100 parts completes in milliseconds because no compression work is needed. The resulting ZIP file can be extracted with any standard ZIP utility.
Why Use This Tool
Common use cases
Splitting and merging files is a core workflow in data management, software distribution, and system administration:
- Email attachment limits — most email providers cap attachments at 25 MB. Split a 100 MB file into four 25 MB parts, send each in a separate email, and the recipient merges them back.
- FAT32 file system limits — USB drives formatted as FAT32 cannot store files larger than 4 GB. Splitting a 6 GB video into 2 GB chunks lets you transfer it on FAT32 media, then merge on the destination machine.
- Cloud storage upload limits — some services limit individual file uploads to 2 GB or 5 GB. Splitting circumvents these limits while maintaining the original file integrity.
- Large log file analysis — server logs can grow to tens of gigabytes. Splitting by line count produces manageable chunks that text editors and analysis tools can open without running out of memory.
- Data distribution — distribute a large dataset across multiple physical media, download links, or team members. Each recipient gets a subset; merging reconstructs the complete file.
- Version control workarounds — Git repositories struggle with files larger than 100 MB. Splitting binary assets into smaller chunks allows them to be committed without Git LFS.
Privacy and security
This tool processes files entirely within your browser. No data is transmitted to any server, no temporary copies are created in the cloud, and no analytics track the files you work with. The File.slice() API operates on the browser's internal file handle — even the JavaScript runtime does not have a copy of the full file in memory. For sensitive documents such as legal contracts, medical records, or proprietary datasets, local processing eliminates the risk of data exposure during transit.
Related tools
After splitting or merging files, use the Hash Generator to verify file integrity by comparing SHA-256 digests before and after. The GZIP Compress tool can reduce file sizes before splitting if the data is compressible. For inspecting binary content of individual parts, the Hex Dump Viewer shows raw bytes. The Reverse File tool is useful for binary analysis workflows alongside split/merge operations.