Text Splitter: Split Any Text by Delimiter, Regex, or Chunk Size
Splitting text is one of the most fundamental data manipulation tasks — extracting emails from a comma-separated list, breaking a CSV row into fields, tokenizing a log line by pipe characters, or chunking a document for a vector database. Our Text Splitter handles all of these scenarios and more with six distinct split modes, all processed instantly in your browser without any server round-trip.
Unlike simple "split by newline" tools, this splitter gives you full control: choose a custom delimiter (including invisible characters like tabs), write a regular expression pattern, or split into fixed-size overlapping chunks for AI context windows. The output is displayed as numbered segment cards for easy inspection — or as a raw block for large outputs — with per-segment statistics including count, average length, and longest segment.
Whether you're cleaning data for a spreadsheet import, preparing tokens for NLP, extracting fields from structured logs, or generating test fixtures, the Text Splitter handles it precisely and instantly.
The pipeline applies trim and empty-removal after splitting, then optionally numbers segments, then joins them with your chosen separator for display and copy.
Six Split Modes Explained
By Delimiter: The most common mode. Enter any character or string — comma, semicolon, pipe, tab (\t), newline (\n), double newline, dash, or any custom sequence. Quick-select buttons cover the most common choices.
By Lines: Splits on any line break (\n, \r\n, or \r), useful for converting multi-line text into an array of individual lines.
By Words: Splits on any whitespace sequence, returning individual word tokens. Useful for word frequency analysis, deduplication, or building word lists.
By Characters: Returns every individual character as a segment. Useful for character-level analysis, cipher work, or building character frequency maps.
By Regex: Accepts any valid JavaScript RegExp pattern (without slashes). Split on multiple delimiters at once (e.g. [;,|]), split on whitespace runs (\s+), or any complex boundary pattern.
Fixed Chunks: Splits into equal-size segments by character count. Configure the chunk size and optional overlap for sliding-window use cases like LLM context chunking and document segmentation.
Common Use Cases
Email list extraction: Paste a comma or semicolon-separated email list, split by delimiter, trim whitespace — get a clean numbered list to paste into your mailing tool.
CSV field parsing: Paste a CSV row, split by comma, see each field in its own numbered card to verify field positions.
Log line parsing: Split Apache or Nginx log lines by spaces or pipe characters to inspect individual fields like timestamp, IP, status code, and response size.
LLM document chunking: Use Fixed Chunks mode with size 512 and overlap 64 to prepare document segments for vector embedding and RAG pipelines.
NLP tokenization: Split by words to produce token arrays for frequency analysis, then copy the numbered list directly into your analysis pipeline.
Practical Examples
Comma-Separated Email List
Splitting a raw comma-separated email list into individual addressees.
- 1.Input: "john@example.com, jane@example.com, bob@example.com, alice@example.com"
- 2.Mode: By Delimiter · Delimiter: comma (,) · Trim: on · Remove empty: on
- 3.Output: 4 segments: "john@example.com" / "jane@example.com" / "bob@example.com" / "alice@example.com"
- 4.Stats: 4 segments · Avg length: 17 chars · Longest: 18 chars
Fixed Chunk Splitting for LLM Context Windows
Splitting a long passage into 100-character overlapping chunks for vector embedding.
- 1.Input: 218-character Lorem Ipsum passage
- 2.Mode: Fixed Chunks · Chunk Size: 100 · Overlap: 20
- 3.Step size: 80 characters (100 - 20 overlap)
- 4.Output: 3 chunks — each sharing 20 characters with the next for context continuity
- 5.Use case: RAG pipelines, semantic search indexes, LLM document ingestion
Frequently Asked Questions
Is my text secure when using the Text Splitter?
Yes, 100%. All splitting happens entirely inside your web browser. Your text is never sent to any server, logged, or stored anywhere externally.
What split modes are available?
Six modes: By Delimiter (split on any character string), By Lines (split on newlines), By Words (split on whitespace), By Characters (individual characters), By Regex (regular expression pattern), and Fixed Chunks (equal-size segments by character count with optional overlap).
Can I split on invisible characters like tabs or newlines?
Yes. Type \t for tab or \n for newline in the delimiter field. The tool automatically resolves these escape sequences before splitting.
What does the 'Overlap' setting do in Fixed Chunks mode?
Overlap lets consecutive chunks share characters. For example, with chunk size 100 and overlap 20, each chunk starts 80 characters after the previous one, sharing the last 20 characters with the next chunk. This is useful for NLP context windows and sliding window analysis.
How are segments displayed?
For up to 80 segments, each segment is shown in an individually numbered card making it easy to inspect. For larger outputs (more than 80 segments), the raw joined text is shown in a scrollable monospace block to preserve performance.
Can I use a regex pattern to split?
Yes. Select the 'By Regex' mode and enter any valid JavaScript regular expression pattern, such as \s+|, to split on whitespace or commas, or [;,|] to split on any of three delimiters simultaneously.
Can I number the output segments?
Yes. Enable 'Number output segments' to prefix each segment with 1., 2., 3. etc. This is useful when copying numbered lists for documents, slides, or structured reports.
Can I download the split output?
Yes. Click the Save button to download the output as a plain .txt file with your chosen join character between segments.