Split Text by Delimiter
Cut each line at a separator and keep the parts you want, or break text into one item per line.
Splits the whole text at every delimiter and puts each piece on its own line. Line breaks also separate pieces.
Splits at: comma. Type \t for a tab and \n for a line break.
Quoted CSV fields are not parsed here: a comma inside quotes, as in "Smith, John", still splits the line. For CSV files, use the CSV Column Extractor.
For example 1,3 or 2-4. Use -1 for the last column and 3- for column 3 to the end. Columns come out in the order you list them.
Leave blank to use the delimiter. Type \t for a tab.
Both positions are included. Leave To blank to keep the rest of the line.
Position 1 is the first character of the line, and spaces count. An emoji counts as one character.
How to split text by a delimiter
Paste your text, pick a mode and set the delimiter. The buttons fill in a comma, semicolon, tab, pipe or space,
and Any whitespace splits at any run of spaces and tabs. You can also type any other text, such
as -> or ; , and use \t for a tab. Tick
Delimiter is a regular expression to split at a pattern, for example \s*;\s* for
a semicolon with optional spaces around it. The result updates as you type, and you can copy it or download it
as a .txt file. Everything runs in your browser, so nothing you paste is uploaded.
The three modes, with examples
| Mode and settings | Input | Output |
|---|---|---|
| One piece per line, comma | red, green, blue | red green blue |
| Keep columns 1,3, comma | 2026-09-01,/pricing,120 | 2026-09-01,120 |
| Keep column -1, any whitespace | GET /docs 200 | 200 |
| Keep columns 2, with remove columns instead | a,b,c,d | a,c,d |
| Cut by position, 12 to 19 | 2026-09-29 08:14:02 GET | 08:14:02 |
| Cut by position, last 4 characters | invoice-2026-0042 | 0042 |
Trim pieces removes spaces and tabs around every piece, so a, b gives
b without the space in front. Remove empty pieces drops pieces with nothing in
them, such as the gap in a,,b; in the other two modes it drops blank lines and lines that come out
empty. Remove duplicate output lines keeps the first copy of each line.
What the column syntax means
1,3keeps columns 1 and 3.2-4keeps columns 2, 3 and 4.-1is the last column of each line,-2the one before it.3-keeps column 3 to the end of the line, and2--1means column 2 to the last.
Combine them with commas, as in 1,3-5,-1. Columns come out in the order you type them, so
3,1 swaps two columns and a column listed twice appears twice. Column numbers start at 1, and a
range that runs backwards, such as 4-2, is flagged. Tick
Remove columns instead to drop the listed columns and keep the rest.
When a line has fewer fields than you asked for, the tool either keeps it with the missing fields left blank, which keeps the output lined up with the input, or skips it. The kept fields are joined with the output separator. Left blank, it is the same as the delimiter; with a regular expression the tool uses the first delimiter it finds, tidied up (a run of spaces becomes one space). The stats show which separator was used.
Extracting one column from log lines or copied tables
Cells copied from Excel or Google Sheets arrive as tab-separated text, so press Tab, choose Keep columns and enter the column number. For server logs, use Any whitespace. In this access log line, column 1 is the IP address, column 7 the path and column 9 the status code:
203.0.113.7 - - [29/Sep/2026:08:14:02 +0000] "GET /pricing HTTP/1.1" 200 5120
Brackets and quotes are ordinary characters here, so the date splits into two fields. Counting from the end
works too: in this format only the response size follows the status code, so -2 is the status on
every line. Enter 7,9 to get the path and status side by side. The same approach pulls URLs out of
a crawl export or keywords out of a rank tracker report.
Splitting a comma-separated list into lines
A keyword list from a spreadsheet cell, a meta keywords tag or a tag field often arrives as
seo tools, keyword research, backlinks. One piece per line with a comma turns it
into three lines, with the spaces trimmed and the empty pieces from doubled or trailing commas removed. Tick
Remove duplicate output lines to get a clean list. To go the other way, use
Join Lines.
Limits
This is a plain split, not a CSV parser: a comma inside quotes, as in "Smith, John", still splits
the line. For real CSV files, use the CSV Column Extractor. Each line
is split on its own, so a delimiter never matches across a line break. Positions in the cut mode count Unicode
code points: a simple emoji counts as one character, but flags, emoji with skin tones and letters built from a
base letter plus an accent mark count as more than one. When the text you want sits between two markers rather
than at a fixed column, Extract Text Between is a better fit. Above
about 2 MB of text, live updates pause and you press Split text instead.
The same split in Excel, Google Sheets and the command line
- Excel: Data > Text to Columns > Delimited splits a column of cells. In Excel for
Microsoft 365,
=TEXTSPLIT(A1, ",")splits into columns and=TEXTSPLIT(A1, , ",")into rows. - Google Sheets:
=SPLIT(A1, ","). By default every character of the delimiter counts on its own, so=SPLIT(A1, ", ")splits at commas and at spaces. AddFALSEas the third argument to split at the whole string. - cut:
cut -d, -f1,3 data.csvkeeps fields 1 and 3, andcut -c1-10keeps characters 1 to 10. The delimiter must be a single character, fields always come out in their original order, and-f-3means fields 1 to 3, while-3here means the third column from the end. - awk:
awk -F, '{print $1, $3}' data.csvprints fields 1 and 3 separated by a space, andawk '{print $NF}' access.logprints the last whitespace-separated field, like Any whitespace with column-1here.
Frequently asked questions
How do I split a comma-separated list into separate lines?
Paste the list, choose One piece per line and keep the comma as the delimiter. Each item goes on its own line, with the spaces around it trimmed and empty items from doubled or trailing commas removed.
How do I extract one column from text?
Choose Keep columns, set the delimiter your text uses and type the column number, for example 2. Use -1 for the last column, a range such as 2-4, or a list such as 1,3.
Can I split text by tab or by several spaces?
Yes. The Tab button splits text copied from a spreadsheet, and Any whitespace treats every run of spaces and tabs as one delimiter, which suits log files and aligned columns.
Can I split text with a regular expression?
Yes. Tick Delimiter is a regular expression and type a JavaScript pattern such as \s*;\s*. Text matched by capture groups is not added to the output, and an invalid pattern shows an error explaining what to fix.
Does this tool handle CSV files with quoted fields?
No. It splits at every delimiter, including one inside quotes, so "Smith, John" becomes two fields. Use the CSV Column Extractor for files with quoted fields.
Is my text uploaded anywhere?
No. Splitting runs in your browser and nothing you paste is sent to a server. Text under 200 KB is kept in your browser's local storage so it is still there when you come back.