Skip to content
DevToolKit

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.

Drop a file here to split it

Any file type. Processed entirely in your browser.

Processed locally
Was this tool helpful?

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

  1. 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.
  2. Drop or select your file. Any file type is accepted: archives, videos, disk images, databases, logs. There is no file type restriction.
  3. 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.
  4. Review the estimated parts count shown below the size input. This updates in real time as you adjust the chunk size.
  5. 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.
  6. 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

  1. Drop or select a text file — the tool reads it as UTF-8 text.
  2. Switch to "Line Count" using the split-by selector.
  3. 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.
  4. Click "Split File." The tool detects whether the file uses Unix (LF) or Windows (CRLF) line endings and preserves them in every output part.
  5. Download parts individually or as a ZIP.

How to merge files

  1. Switch to Merge mode using the mode toggle at the top.
  2. Add files by dragging them into the dropzone or clicking to browse. Add as many files as needed — each drop appends to the list.
  3. Arrange the order using the up and down arrow buttons next to each file. The merge concatenates files from top to bottom.
  4. Remove unwanted files by clicking the X button.
  5. Click "Merge Files" to concatenate all files into one. The tool reads each file in 1MB chunks, so merging large files stays memory-efficient.
  6. Download the merged file. The output filename is derived from the first file in the list, with any .001 suffix 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.

FAQ

What is the maximum file size I can split?
There is no hard limit. The tool uses the File.slice() API to read and split files in chunks, so it never loads the entire file into memory. In practice, your browser tab's memory allocation (typically 1-4 GB) is the upper bound. Files up to several hundred megabytes split reliably on all modern browsers.
Are the split parts compatible with HJSplit?
Yes. Parts are named using the .001, .002, .003 convention that HJSplit and other file splitters recognize. You can split a file here and merge it with HJSplit (or vice versa) because the format is a simple byte-level concatenation with sequential numbering.
How does the line-count split handle different line endings?
The tool detects whether the file uses Unix-style LF or Windows-style CRLF line endings and preserves the original style in every split part. Mixed line endings within a single file are normalized to whichever style appears first.
Can I merge files that were not split by this tool?
Yes. The merge mode concatenates any files in the order you arrange them. This works for reassembling split archives, joining log file segments, combining CSV exports, or appending any binary data. The output is a raw byte-level concatenation with no added headers or separators.
Is my data sent to a server during splitting or merging?
No. All processing happens entirely in your browser using the File API and Blob API. Your files never leave your device. You can verify this by disconnecting from the internet — the tool will continue to work normally.