the delimiter, not the data · free code · no upload

n8n read your whole CSV as one column named name;email;company;topic

Nothing is corrupted. Your file is semicolon or tab separated and the parser was told comma, so it found no commas and every line became one field. Here is how to tell which separator you have, the node that sniffs it, and what it actually did to one 12-lead list saved three ways.

Why the header becomes a column name

A CSV parser reads the first line, counts the separator in it, and names the columns after the pieces. Feed it a header that contains no commas and the line is one piece — so the column is called name;email;company;topic and every row under it holds an entire record as text. Nothing in the values is damaged; the split simply never happened.

Two files cause almost all of it, and neither is exotic:

The cheap test takes ten seconds and no tool: open the file in a text editor. name;email;company;topic is semicolon separated, the same words with wide gaps are tab separated.

What the sniffer did to the same 12 leads, saved three ways

The sample is the 12-row lead export used elsewhere on this site. It was written out three times: as it ships (comma), as a European Excel export (semicolon, quoted fields), and as a clipboard paste (tab). Each copy was fed to the node below with a comma-only split as the control.

Copy of the fileSplit on comma onlyWith the sniffer
Comma (as shipped, 13 lines)12 rows × 4 cols12 rows × 4 cols
Semicolon export (14 lines)14 rows × 1 col, named name;email;company;topic12 rows × 4 cols
Tab paste (13 lines)13 rows × 1 col, named name   email with tabs12 rows × 4 cols

This is the failure exactly as it arrives: the header line alone as a column name, and the row count one or two higher than the real one because a line of bare separators is still a line. All three copies come back as 12 rows and 4 columns named name, email, company, topic once the delimiter is detected — including the accent-bearing values, which were never the problem. The semicolon copy is here if you want to reproduce it on your own instance; the comma original is here.

The node, in full

Code node, Run Once for All Items, mode JavaScript. Input: one item whose json.data is the raw file text, which is what Read/Download a file hands you. It prints the separator it chose and the shape it produced, so a wrong guess is visible in the node output instead of silently producing a single column. No credential, no network call, nothing written.

// Detect the delimiter, then parse as a table. Run Once for All Items.
// Input: one item whose json.data is the raw file text (from Read/Download a file).
function csvRecords(text, delim) {
  var s = String(text || '').replace(/\r\n?/g, '\n');
  var out = [], cells = [], cur = '', q = false;
  for (var i = 0; i < s.length; i++) {
    var c = s.charAt(i);
    if (q) {
      if (c === '"') { if (s.charAt(i + 1) === '"') { cur += '"'; i++; } else { q = false; } }
      else { cur += c; }
    } else if (c === '"') { q = true; }
    else if (c === delim) { cells.push(cur); cur = ''; }
    else if (c === '\n') { cells.push(cur); out.push(cells); cells = []; cur = ''; }
    else { cur += c; }
  }
  cells.push(cur);
  out.push(cells);
  return out.filter(function (r) { return r.some(function (v) { return String(v).trim() !== ''; }); });
}

function pickDelimiter(text) {
  var best = ',', bestScore = -1;
  [',', ';', '\t'].forEach(function (d) {
    var recs = csvRecords(text, d);
    if (!recs.length) return;
    var counts = {}, modal = 0, modalCount = 0;
    recs.forEach(function (r) {
      var n = r.length;
      counts[n] = (counts[n] || 0) + 1;
      if (counts[n] > modalCount) { modalCount = counts[n]; modal = n; }
    });
    if (modal < 2) return;
    var score = (modal - 1) * (modalCount / recs.length);
    if (score > bestScore) { bestScore = score; best = d; }
  });
  return best;
}

const raw = items[0].json.data;
const delim = pickDelimiter(raw);
const recs = csvRecords(raw, delim);
const head = recs.shift().map(h => String(h).trim());
const rows = recs.map(r => {
  const o = {};
  head.forEach((h, i) => { o[h || 'column_' + (i + 1)] = String(r[i] == null ? '' : r[i]).trim(); });
  return { json: o };
});
console.log('delimiter', JSON.stringify(delim), 'columns', head.length, 'rows', rows.length);
return rows;

The same code as a gist, if a link is easier to send than this page: n8n reads my whole CSV as one column — the delimiter sniffer, plus what it printed on all three copies.

How it decides: for each candidate separator it counts how many fields each line splits into, takes the most common count, and scores it by that count weighted by how many lines agree. A single column scores nothing, so the default stays comma and a genuinely one-column file comes back unchanged rather than mangled. Quotes are handled — a separator inside a quoted field is text, and "" inside a quoted field is one quote character.

Why 12 rows and not 13

One row of the export is ;;; — separators and nothing else, a blank line the source system kept. The node drops a row only when every cell in it is empty, so that line never becomes a lead with an empty address. The semicolon copy has 14 lines because the blank row survives as punctuation; the tab copy has 13 because a row of tab characters is whitespace and the file writer dropped it. Both end at 12 records, which is the honest number.

The same rule means a footer, a total line or a stray blank at the end never lands in your CRM as a record — and it also means a real lead whose every field is blank is indistinguishable from noise, because it is.

What this does not fix

Fix it without writing the node

The browser repair page does the same detection and re-downloads the file as a real comma CSV, so the next tool that reads it needs no cleverness at all. Nothing is uploaded — the file stays in the tab.

If the file has to become a working pipeline

Splitting is one line of the job. The pack ($49 launch, 14-day refund on request) is the rest of it: intake that lands the rows in the right sheet, the dedupe pass on top of the split, an outreach draft per surviving lead with a review queue instead of a send button, and a report naming every dropped row and every rejected address. Four workflows, importable JSON, a first-run guide and a troubleshooting page written from runs that failed rather than from theory.

The receipt page hands you the ZIP immediately — no email round-trip and no account to create. The charge comes from dragana.karans@gmail.com; questions, files and refunds go to perun.intelligence@gmail.com.

Questions this page gets

Why does n8n put my whole CSV into one column?

The file is not comma separated. A European Excel export writes the list separator from the machine regional settings, which is a semicolon where the decimal separator is a comma; a range copied out of Excel or Google Sheets is tab separated. A parser that only counts commas finds none in the header line, so the line becomes one field and its name is the entire header.

How do I know my file is semicolon separated?

Open it in a plain text editor, not a spreadsheet. The first line reads name;email;company;topic. The browser repair page shows the same thing before it converts anything, and the code on this page prints the delimiter it chose.

Is one column named name;email;company;topic the same as an encoding problem?

No. Encoding damage shows up inside the values: question marks, or letters like é instead of e-accent. Here the values are intact and only the split is wrong, so nothing is lost and re-exporting or re-splitting it gives the whole table back.

Can I just save the file as CSV again?

Yes, if you still have the spreadsheet: use Save As and pick the comma variant explicitly, then reopen it. If the file came from a client or a system you do not control, split it yourself with the node below, or convert it in the browser without uploading it anywhere.

Does the sniffer break a file that really has one column?

No. A file where every line has one field scores nothing for any delimiter, so the node falls back to comma and returns the single column as it is. A one-column export is a genuinely different problem and this node cannot split what has no separator in it.

What about pipe-separated or space-aligned files?

Not handled. The sniffer tries comma, semicolon and tab because those are what spreadsheet and CRM exports actually write. A pipe-separated file needs the delimiter added to the list, one string, or a conversion first.

Honest limits: this detects comma, semicolon and tab only, on a file you already have as text; it does not fetch anything, verify addresses, dedupe or send. The row and column counts above come from the shipped sample copies and reproduce with the node exactly as printed on this page.
Free workflows live at github.com/fejzadenis/n8n-lead-toolkit · more free fixes: removing duplicate leads in n8n · names arriving as ???? in Google Sheets · "Invalid Record Length: columns length is 7, got 8" · all three free workflows · LeadFlow home