Text File Splitter
Free online tool to split large text files into smaller ones by line count.
Tool Guide
About the Text File Splitter
The online text file splitter lets you split a large text file into multiple smaller text files by a specified number of lines, with one-click packaged download.
It supports setting the line break for the split text files. The default is LF mode, using \n as the line break, and you can set any character such as \r\n as needed, as well as the \t tab.
Pay attention to file encoding. Files are read as UTF-8 by default; if the data reads as garbled text, try switching to GB2312 or another encoding.
How to Split a File with the Tool
1. Upload the text file: click to upload or drag the file into the upload box.
2. Set the number of lines per file: specify how many lines make up one file, i.e. enter the number of lines you want each smaller file to contain.
3. Choose the line break (optional): set the output line separator. \n is used by default, and you can set any character as needed.
4. Choose whether to remove spaces: optionally remove leading spaces from each line.
5. Run the split: click the "Split File" button to split the file into multiple files.
6. Download the split files: download individual files, or download all files as a package to your device.
File Splitting FAQ
Which text formats does the splitter support?
It supports plain text formats such as .txt and .csv. To split other formats, convert them to TXT first.
How do I set the line break?
\n is used by default, suitable for Linux and Mac. For Windows compatibility, choose \r\n.
What if the file shows garbled text?
UTF-8 encoding is used by default. If the text is garbled, try GB2312 or another encoding.
Is there a maximum file size limit?
Fairly large text files are generally supported, but very large files may affect processing speed, so we recommend working in reasonable batches.
Related Tools
File MD5 Calculator
Free online batch file MD5 hash value calculator.
File Compressor
Free online file compression tool for batch packaging files into ZIP archives.
Text File Merger
Free online tool to merge multiple TXT text files into one.
Text File Reader
Free online tool to read TXT, code, SVG, and other text file content.
File Info Reader
Free online batch file metadata reader for name, size, type, and modification time.
Directory Info Reader
Free online directory file info reader supporting folder hierarchy and file details.