Komma

Fix CSV line breaks and quotes that split rows or columns on Mac

When a CSV note spills into extra rows or columns, check quoting as well as the delimiter. Enclose values containing commas or line breaks in double quotes, and configure the importer to recognize that same quote character.

By Komma · Reviewed: · Documentation and synthetic samples checked; no native app test

Distinguish extra records from a multiline cell

A note or address spanning several text lines does not necessarily mean the CSV is broken. Work on a copy and check whether each product ID still belongs to the right quantity. One table record can occupy more than one line in a text view.

If everything lands in one column, start with delimiter settings. For unreadable characters, check encoding. This guide covers comma-separated files where particular descriptions spill into extra columns or rows.

Represent commas, line breaks and quotes inside a value

Enclose a value containing a comma or line break in straight double quotes, ". Represent a literal quote inside that value as "". Curly quotes, “ ”, are different characters. These are the common conventions described in RFC 4180; check any additional requirements from the destination.

id,note,quantity
P003,"blue, ruled",10
P001,"Front desk
Second floor",2
P002,"He said ""ready""",2
P004,,1

This example has one header and four data records, each with three fields. P001 has one note containing a line break; P002 has the note He said "ready"; P004 has an empty note. The six physical text lines are not six records.

Download the sample CSV. It is a synthetic UTF-8 file with CRLF line endings for checking these values.

Check text qualifiers when importing into Numbers

  1. Open a copy in Numbers and select the table before editing it.
  2. Go to Format → Table → Adjust Import Settings.
  3. Under Delimited, choose comma and set Text Qualifier to the straight double quote. Leave “Treat consecutive delimiters as one” off to retain empty fields.
  4. Choose Update Table. Check that P001 has quantity 2 and P004 has quantity 1 in the quantity column.

This follows Apple’s text import documentation. Import settings cannot be adjusted after editing; reopen an untouched copy if needed. Labels may differ between versions.

If the settings do not fix the file

If the sample works but your file does not, compare the first affected record with the source data. For example, P003,blue, ruled,10 has four fields. If you have confirmed that the intended note is blue, ruled, quote that entire field as shown above.

An unclosed quoted field can absorb later records. When you cannot identify the original boundary, re-export from the source instead of guessing where to join or split text. For a small manual correction, use a copy and an editor that supports plain text and straight quotes.

Removing every comma or line break changes both separators and actual content. If the destination explicitly forbids multiline cells, first import the table correctly, replace line breaks only in the relevant cells with the agreed character, and export a separate file. That deliberately changes the data.

Check cells after saving, not just line counts

In Numbers, use File → Export To → CSV to create a separate output. See Numbers CSV export settings for details.

  • There should be five records including the header, with three fields each.
  • P001’s note should remain one cell containing a line break.
  • P002 should retain the literal quotation marks; P004 should retain its empty note and quantity.
  • The destination’s import preview should show the same values and record count.

Different quoting or line endings can represent the same cell values. Conversely, a readable table may still be rejected by a destination that disallows multiline fields. Check the content and the destination’s format requirements separately.

What was checked

On October 27, 2026, we reviewed the official sources above and used Python’s standard csv module to compare all 15 sample cells, including after writing and reading them again. This is a synthetic format check, not a native Numbers test or a compatibility test for every importer.

Back to CSV editing guides