Drop a text file here

TXT, CSV, LOG, JSON Lines, Markdown, SQL or any plain-text file. It's split in your browser; nothing is uploaded.

Or paste text instead
How to split
Every file

{name} original name, {n} part number, {total} number of files.

Result

Choose a file to see how it will be split.

    How to split a large text file

    1. Drop your file into the box above, choose it from your device, or paste text.
    2. Pick how to split it: every N lines, by maximum file size, into a set number of files, or at a marker such as ---, a chapter heading or blank lines.
    3. For CSV files, set Repeat the first lines to First line so every piece keeps the column headers.
    4. Check the list of files, then download them one at a time or all together as a ZIP.

    Which split method should I use?

    MethodBest for
    Every N linesCSV exports and lists that need a row limit, such as imports that accept 1,000 or 5,000 rows at a time
    By file sizeUpload and attachment limits, like email attachments, form uploads or AI chat file limits. Lines are kept whole unless you turn that off.
    Into a set number of filesSharing work between people or processes, such as 4 equal pieces, balanced by line count or by size
    At a markerDocuments with natural sections: chapters, --- separators, blank-line paragraphs, page breaks, or log entries that start with a date (using a regular expression)

    TXT splitter FAQ

    Is my file uploaded anywhere?

    No. The file is read and split by JavaScript in your own browser, and the pieces are created on your device. Nothing is sent to a server.

    How big a file can I split?

    It depends on your device's memory, but files of several hundred megabytes usually work on a desktop browser. Splitting by lines or size works directly on the file's bytes, so even large logs split quickly.

    How do I split a CSV file and keep the header row in every file?

    Choose Every N lines (or By file size), then set Repeat the first lines in every file to First line (CSV header). Each piece starts with the column names, so it opens correctly in Excel or imports on its own. The header isn't counted toward the lines-per-file number.

    Will splitting change my file's encoding or line endings?

    For lines, size and set-number splits, the pieces are exact byte-for-byte slices of your original file, so the encoding and Windows or Unix line endings stay as they were. Splitting at a marker re-saves the text as UTF-8. UTF-16 files are also re-saved as UTF-8, and the tool tells you when that happens.

    Can a size split cut a line or character in half?

    With Never cut a line in half on, every file ends at the end of a line. If a single line is bigger than the size limit, it gets a file of its own and you'll see a note. With the option off, files are cut as close to the limit as possible, but never in the middle of a multi-byte character like é or an emoji.

    How does splitting at a regular expression work?

    Choose A regular expression and enter a JavaScript pattern. For example, ^\d{4}-\d{2}-\d{2} starts a new file at every line beginning with a date, and ^Chapter \d+ splits a book at each chapter. Matching is multi-line, so ^ and $ mean the start and end of a line.

    How are the files named?

    By default, report.csv becomes report-part01.csv, report-part02.csv and so on. Part numbers get leading zeros so the files sort in the right order. You can change the pattern using {name}, {n} and {total}.

    Our Full Text Tool Library

    Flipper File