String Splitter — Split Text Online

Break a string into pieces by a delimiter, a fixed length, or a pattern — then join the pieces however you need.

Input
Parts
Ready

Split text the way you need

The string splitter breaks a piece of text into parts and joins them back together with the separator you choose. It is the quickest way to turn red, green, blue into a vertical list, convert a pipe-delimited line into rows, or cut a long code into fixed-size chunks — without opening a spreadsheet or writing a script.

Three ways to split

By delimiter

Type the character or string that separates your values: a comma, semicolon, pipe |, a word like and, or \t for a tab. Leave the box empty to split into individual characters.

Every N characters

Cuts the text into pieces of equal length. Useful for chunking long hashes or keys for readability, preparing fixed-width data, or splitting a long message into SMS-sized blocks. Emoji and accented letters count as one character, so they are never cut in half.

By regular expression

For messy input, split on a pattern instead of a single character. Some useful patterns:

PatternSplits on
[;,|]\s*Commas, semicolons or pipes, plus any spaces after them
\s+Any run of spaces, tabs or line breaks (split into words)
(?<=[.!?])\s+The space after each sentence (split into sentences)
\d+Any number, keeping the text between numbers

Test more complex patterns in the Regex Tester first.

Formatting the output

Trim removes spaces around each part, so "a , b" gives a and b instead of "a " and " b". Drop empty removes blanks caused by doubled delimiters such as ,,. Wrap puts each part in quotes — handy when building a SQL IN ('a','b','c') list or a JavaScript or Python array. Choose Join with: Comma and single quotes, and paste the result between brackets.

Splitting happens in your browser, so the text you paste stays on your device.

Frequently asked questions

How do I split text by new line?
Choose "Regex" and enter \n, or choose Delimiter and type \n. Each line becomes a separate part.
How do I turn a comma-separated list into a column?
Keep Delimiter set to a comma and Join with set to New line. Copy the output and paste it into a spreadsheet column.
How can I build a SQL IN list?
Split your values by new line, set Wrap to single quotes and Join with to Comma, then paste the output inside IN ( ).
Does splitting every N characters break emoji?
No. The text is split by Unicode characters, not bytes, so emoji and accented letters stay whole.

Related tools

Remove Empty Lines, Regex Tester, Find & Replace, Alphabetizer.