Split a text (or .txt) file into multiple files

How to split a large text (or .txt) file into multiple files

SplitCSV.com is the easiest way to split a large text file (with a file extension of .txt) file into multiple files. If you have a TXT file that is too large to open in a specific program (like Excel or Google Sheets) because it uses too much memory or hits the row/column limit, you can often break it apart into smaller files and then load each file individually. smaller files. Here is the easiest way to do it:

  1. Go to https://www.splitcsv.com (yes it works for TXT Files as well)!
  2. Click the Choose File button and select your TXT file. The file will begin uploading immediately. 
  3. Indicate whether or not there is a header section, and if so how many lines should be copied into each split file. 
  4. You can choose how to split the file: you can limit the number of rows in each TXT output file (by selecting the Rows tab and entering the maximum number of rows in each file), the size of each file (by selecting the Size tab and then entering the appropriate size in bytes) or specify the exact number of files to produce (by selecting the Files tab and then entering the number of files to output). The image below shows an example of limiting the file size.
  5. Press the Confirm button to verify the choices, then press the Split button to queue the split up and view the receipt.
  6. The split will be queued for completion, and should be executed shortly. The receipt page will refresh to include a link to the split results: all results will be zipped up for download.

All uploaded files will be kept for at most 7 days before being deleted: depending on volume it could be earlier. 

The original source file isn't downloadable, and the link to download the results will only be available on the receipt page, no where else. How-to video available here:

How to split a large txt file using Linux

Linux has a command utility you can use to split a large txt file. A more comprehensive view of these utilities is available here:

Syntax

split [options] filename prefix

In place of "filename" insert the name of the txt file that you're trying to split. "prefix" should be the name you'd like to give the smaller files. "[options]" is optional - you can exclude it entirely, or replace it with any of the following alternatives, depending on what exactly you're trying to achieve:

-a –suffix-length=N use suffixes of length N (default 2)
-b –bytes=SIZE put SIZE bytes per output file
-C –line-bytes=SIZE put at most SIZE bytes of lines per output file
-d –numeric-suffixes use numeric suffixes instead of alphabetic
-l –lines=NUMBER put NUMBER lines per output file

Happy splitting! Email team@splitcsv.com - we'd love to hear from you!