String Splitter

Split a string by comma, new line, tab, custom text, a regular expression or into fixed-length chunks.

Options

0 parts

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Paste a string, pick a separator and the parts appear instantly. You can split a string by comma, new line, space, tab, semicolon or pipe, by any custom text, by a regular expression, or into fixed-length chunks of N characters. Then choose how the parts are joined back together — one per line, comma separated, tab separated or your own joiner — so the tool doubles as a quick "comma separated to lines" and "lines to CSV" converter.

The option checkboxes clean the list up as you go: trim whitespace around every part, drop empty parts, remove duplicates, sort alphabetically, wrap each part in double quotes (handy for building SQL IN lists or JSON arrays) and number the parts. In custom and regex mode you can type \n and \t for a newline or tab, and an invalid pattern is reported instead of failing silently. Everything runs in your browser with JavaScript — your text is never uploaded, so it is safe for logs, keys and customer data.

Frequently asked questions

How do I split a string by comma?

Paste your string in the input box and leave "Split by" on Comma — the parts appear instantly, one per line. "Trim each part" removes the spaces after each comma and "Remove empty parts" drops blanks left by trailing commas. Change "Join results with" if you want the parts back on a single line instead.

Can I split a string with a regular expression?

Yes. Choose "Regular expression…" under Split by and type a pattern such as \d+ or [,;|] to split on several separators at once. The pattern is compiled with the browser's own RegExp engine, and an invalid pattern is reported in the error line instead of silently returning the wrong result.

How do I split a string every N characters?

Pick "Every N characters" under Split by and set the chunk size — the string is cut into equal-length pieces, with the remainder as the last part. It is handy for splitting long IDs, hex strings or fixed-width records. Everything runs locally in your browser, so nothing is uploaded.

Report a bug