Commas to newlines, plain and predictable
Commas to newlines conversion takes a comma-separated string and writes one item per line. The default behaviour splits on every single comma and trims whitespace around each piece, so apple, banana, cherry becomes three lines: apple, banana, cherry. The split is positional, not CSV-aware, so a comma inside a quoted field is treated as a separator. If you need RFC 4180 quote handling, paste your CSV into CSV to JSON instead.
Three toggles change the split behaviour. Collapse Repeats treats runs of consecutive commas (a,,b,,,c) as a single separator, so the output has no empty lines between items. Skip Digits protects commas that sit between two digits, so the thousands separator in 1,000 survives the conversion and the value stays on one line. Trim Lines, on by default, strips whitespace from each split piece; turn it off to keep leading and trailing spaces.
Each toggle is independent. Collapse Repeats and Skip Digits can both be on, in which case digit-internal commas are protected first and then any remaining repeated commas collapse. Trim Lines runs after the split. For the inverse direction, see newlines to commas.
How to use convert commas to newlines
- 1Paste your comma-separated list into the input panel on the left.
- 2Toggle Trim Lines to control whitespace handling around each piece.
- 3Toggle Skip Digits to protect commas inside numbers like
1,000. - 4Toggle Collapse Repeats to merge runs of commas into one separator.
- 5Click Copy in the output header to copy the line-per-item result.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Trim Lines toggle (default on)
When on, each split piece has its leading and trailing whitespace stripped via String.trim. So apple, banana becomes apple and banana, not apple and banana. Turn off to keep the original spacing exactly as pasted.
Skip Digits toggle (default off)
When on, a comma sitting between two digits is protected from the split. So 1,000 stays as one line; red, 1,000, blue becomes three lines. The protection uses a sentinel during split and restoration after, so any other comma in the input still splits normally.
Collapse Repeats toggle (default off)
When on, runs of consecutive commas (a,,b,,,c) split as a single separator, so the output has no empty lines between items. When off, each comma triggers a split, so a,,b becomes three lines: a, an empty line, b.
Plain split, not CSV-aware
The split is positional and does not respect RFC 4180 quoting. A comma inside a "quoted, field" is still treated as a separator. If you need CSV-aware splitting that honours quoted fields, paste the source into CSV to JSON instead.
Runs entirely in your browser
No upload, no server-side processing, no log of what you pasted. The split runs on every keystroke via a single regex pass. Long lists of a few thousand items still convert in under a second on a desktop browser.
Worked example
Default toggles. Each comma becomes a newline; whitespace around each piece is trimmed.
apple, banana, cherry, date
apple banana cherry date
Settings reference
| Setting or rule | Effect on output |
|---|---|
| Trim Lines (default on) | Strips whitespace from each split piece via String.trim. Turn off to keep original spacing. |
| Skip Digits (default off) | Protects commas sitting between two digits, so 1,000 stays as one line. |
| Collapse Repeats (default off) | Treats runs of consecutive commas as a single separator. Empty pieces between commas are dropped. |
| Split delimiter | Single comma. Always positional, not CSV-aware. |
| Quoted fields | Not respected. Use CSV to JSON for RFC 4180 handling. |
| Empty input | Emits an empty string. |
| Newlines in source | Pass through. The split happens on commas only. |
FAQ
How do I keep numbers like 1,000 on one line?
1,000 stays as 1,000 on a single line. Other commas in the input still split normally.What about runs of multiple commas?
a,,b becomes three lines (with an empty middle line). Turn on Collapse Repeats to treat runs of consecutive commas as a single separator. The output then drops the empty pieces.