Convert commas to newlines

Paste a comma-separated list and get the same items with one per line. The commas to newlines converter splits the input on every comma and joins the parts with line breaks. Toggles let you collapse repeated commas, skip commas inside numbers (so 1,000 stays as one item), and trim whitespace around each split piece. The transform runs in your browser; nothing uploads.

Input
Line 1:1 LF cloud_done Saved locally
Result Commas to Newlines
0 lines 0 chars

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

  1. 1Paste your comma-separated list into the input panel on the left.
  2. 2Toggle Trim Lines to control whitespace handling around each piece.
  3. 3Toggle Skip Digits to protect commas inside numbers like 1,000.
  4. 4Toggle Collapse Repeats to merge runs of commas into one separator.
  5. 5Click Copy in the output header to copy the line-per-item result.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun 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.

Input
apple, banana, cherry, date
Output
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?
Turn on the Skip Digits toggle. The converter then protects every comma that sits between two digit characters, so 1,000 stays as 1,000 on a single line. Other commas in the input still split normally.
What about runs of multiple commas?
By default, every comma triggers a split, so 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.
Why does my CSV with quoted fields split inside the quotes?
The split is positional and does not respect RFC 4180 quoting. A comma inside a quoted field is treated the same as any other comma. For CSV-aware splitting, paste your data into CSV to JSON, which honours quoted fields and embedded commas.
Is the list sent anywhere?
No. The split runs entirely in your browser via JavaScript. Nothing is uploaded, nothing is logged, no record of your data exists on our servers.
How do I go the other way?
Paste your line-per-item list into newlines to commas. That tool joins lines with a comma separator, with toggles for trimming, quoting and run collapsing.