Comma-Separated to Lines
Split a comma-separated list into one item per line.
Lines Generated: 0Characters: 0
Splitting a list into rows
The opposite of joining: paste a delimited list and get one item per line, ready to drop into a spreadsheet column or a checklist. Choose a single delimiter or split on any common one at once, trim surrounding whitespace, remove empty entries, and strip wrapping quotes left over from code or CSV. All processing happens locally in your browser.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Turning a comma-separated list into one item per line for review.
- Splitting a pasted tag list before deduplicating it.
- Preparing a list for a field that takes one value per line.
- Making a long single-line list readable.
- Converting a config value into a list you can edit.
Frequently Asked Questions
- What happens to values containing a comma?
- A plain split breaks them. "Smith, John","Doe, Jane" is two quoted values, but naive splitting yields four. If your data has quoted fields, you need proper CSV parsing (RFC 4180) rather than a delimiter split.
- Is surrounding whitespace trimmed?
- It should be — "a, b, c" typically means three values, not "a", " b", " c" with leading spaces. Untrimmed values are a frequent cause of failed lookups and duplicate-looking entries downstream.
- How are empty values handled?
- "a,,b" contains a genuinely empty middle value. Whether to keep it as a blank line or drop it depends on whether position matters — for a fixed-column record it must be kept, for a tag list it usually should not.
- Which line ending is produced?
- LF (\n) by default, the Unix convention. Windows tools may expect CRLF (\r\n); pasting LF-only text into some Windows editors shows everything on one line, which is a display artefact rather than lost data.
- What is this actually useful for?
- Turning a comma list into one-per-line input for tools that expect it — SQL IN clauses, spreadsheet columns, config files — and the reverse when building a query string from a list.
- How is a quoted field handled?
- Properly only by a CSV parser. A plain split on commas breaks `"Smith, John"` in two, which is why a list containing quoted values belongs in the CSV tools rather than a simple separator swap.
- Can it split on something other than a comma?
- Semicolons, tabs and pipes are the usual alternatives, and semicolon is what European locales use in CSV — because the comma is already the decimal separator there.
- What is the reverse operation useful for?
- Turning a column pasted from a spreadsheet into an `IN (...)` clause or a config value. It is the same round trip in the other direction, which is why the two tools are usually used together.
Common errors and gotchas
- Splitting on commas inside quoted values, which breaks those entries.
- Leaving a leading space on every item after the first.
- Losing empty entries that indicated a missing value.
- Assuming the separator is a bare comma when the source uses comma-and-space inconsistently.
- Splitting a decimal value in a locale that uses a comma as the decimal mark.
Related Text Tools tools
Case Converter
Convert between Sentence, Title, camelCase, snake_case, and more.
Word Counter
Count words, characters, and analyze keyword density.
Text to Binary
Convert text into its 8-bit binary representation.
Binary to Text
Decode 8-bit binary back into readable text.
Text Reverser
Reverse text by characters, words, or lines.
Remove Duplicate Lines
Delete repeated lines and keep your list unique.
Remove Empty Lines
Strip blank and whitespace-only lines from text.
Sort Lines Alphabetically
Sort lines A–Z or Z–A, case-sensitive or not.