Split Text by Delimiter

Cut each line at a separator and keep the parts you want, or break text into one item per line.

Mode

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.

Ctrl + Enter splits. The result updates as you type.

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 settingsInputOutput
One piece per line, commared, green, bluered
green
blue
Keep columns 1,3, comma2026-09-01,/pricing,1202026-09-01,120
Keep column -1, any whitespaceGET /docs 200200
Keep columns 2, with remove columns insteada,b,c,da,c,d
Cut by position, 12 to 192026-09-29 08:14:02 GET08:14:02
Cut by position, last 4 charactersinvoice-2026-00420042

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,3 keeps columns 1 and 3.
  • 2-4 keeps columns 2, 3 and 4.
  • -1 is the last column of each line, -2 the one before it.
  • 3- keeps column 3 to the end of the line, and 2--1 means 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. Add FALSE as the third argument to split at the whole string.
  • cut: cut -d, -f1,3 data.csv keeps fields 1 and 3, and cut -c1-10 keeps characters 1 to 10. The delimiter must be a single character, fields always come out in their original order, and -f-3 means fields 1 to 3, while -3 here means the third column from the end.
  • awk: awk -F, '{print $1, $3}' data.csv prints fields 1 and 3 separated by a space, and awk '{print $NF}' access.log prints the last whitespace-separated field, like Any whitespace with column -1 here.

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.