Split Text

Split any text into chunks by line, sentence, word count, character count, or a custom delimiter.

runs locally on your browser. Your data never leaves your device.

Split mode

Paste text on the left to begin.

Common Use Cases

Split a long article into sentence-sized chunks to build an LLM prompt that processes each sentence individually
Divide a word list by every 10 words to create vocabulary flashcard batches
Split a comma-separated list of values into individual items for bulk processing
Break a log file by line to review each log entry as a separate, numbered item

About Split Text

Splitting text into smaller chunks is a surprisingly common operation across writing, programming, and data processing workflows. The need arises any time a piece of text needs to be broken into manageable, consistently sized, or semantically meaningful segments.

One of the most frequent modern use cases is preparing text for large language models (LLMs). Models like GPT-4 or Claude have token limits, typically 4,000 to 128,000 tokens, depending on the model. When you need to process a long document that exceeds the context window, you must split it first, process each chunk separately, and then recombine the results. Splitting by sentence or by a fixed character count (e.g. every 1,000 characters) are common strategies.

Splitting by line is the go-to mode for processing CSV-like data, log files, and line-separated word lists. By-sentence splitting is useful when you want to create flashcards, extract individual facts, or paginate content with natural reading breaks. By-word splitting is useful for generating word-frequency analyses when you want N-word ngrams. By custom delimiter is the most flexible mode: splitting on a comma gives you CSV columns, splitting on `||||` or `---` gives you custom-formatted document sections.

The numbered output makes it easy to refer to a specific chunk ("chunk 14 had a problem") and the stats bar shows total chunks and average chunk size so you can tune the split parameters to produce chunks of a consistent target size.

Frequently Asked Questions

How does 'split by sentence' work?
The tool splits on sequences of sentence-ending punctuation (. ! ?) followed by whitespace or end of text. Each chunk includes the punctuation that ends the sentence. This approach works well for most prose but has known limitations: it will incorrectly split on abbreviations like 'Mr. Smith' or 'e.g.' since those contain a period followed by a space. For precise sentence tokenisation of complex text, a natural-language processing library is more appropriate.
What does 'every N characters' mode do with spaces?
The character split simply slices the raw input text every N characters. It does not try to break at word boundaries, so a chunk boundary can fall in the middle of a word. If you need word-boundary-respecting chunks of a target size, use 'every N words' mode instead, which groups N complete words per chunk.
Does the custom delimiter get included in the output chunks?
No. When you split by a custom delimiter, the delimiter itself is consumed as a separator and is not included in any output chunk. This matches the behaviour of JavaScript's String.split() and most other split functions. If you need to retain the delimiter, consider splitting on an adjacent character and then adding it back manually.
What does the downloaded .txt file look like?
The downloaded file contains all chunks joined by newline characters, one chunk per line. If your chunks themselves contain newlines (e.g. when splitting by a multi-line delimiter), those internal newlines are preserved, and chunks are separated by a single newline. The filename is always 'split-text.txt'.