ToolsEdit PDFArticlesPricingContact
TryPDFKit
Spreadsheets tool

Detect CSV Separator

Paste a few lines or open a file, and see which separator it uses, how many columns it has, and how it is encoded. Nothing leaves your browser.

  • 3 free uses, no sign-up
  • Files stay on your device
  • Paste or open a file
  • Shows encoding too
CSV
How was Detect CSV separator?
Be the first to rate this tool.
1How it works

Detect CSV separator in three steps

  1. 01

    Paste or open

    Paste a few lines into the box or open the CSV file.

  2. 02

    Run the check

    The tool samples the beginning of the file and tests common separators.

  3. 03

    Read the result

    You see the separator, column count, row count, quote style, line endings and encoding, plus the first rows split apart.

2The details

What you get, and what to know

What you get

  • Six candidatesComma, semicolon, tab, pipe, colon and space are tested. Space is chosen only when nothing else fits.
  • Consistency basedThe winner is the separator that splits most lines into the same number of fields.
  • Reads the sep= lineIf the first line says sep=; the report uses it and says so.
  • PreviewThe first five rows are shown split by the detected separator, so you can see if it looks right.
  • File detailsQuote usage, line endings (Windows, Unix or old Mac) and encoding with or without BOM are reported.

Good to know

  • A guess, however goodUnusual files can fool the check. If the preview looks wrong, set the separator by hand in the converter you use next.
  • Sample onlyOnly the start of a large file is examined for the separator.
  • Detection, not conversionThis tool reports and does not change the file. To switch separators use the CSV delimiter changer.
3Use cases

When people use Detect CSV separator

Solve one-column imports

Learn why a file opens as a single column in Excel.

Configure a parser

Know the right delimiter before writing code.

Handle foreign exports

Files from European systems often use semicolons.

Triage unknown attachments

Check what a received CSV looks like.

How the guess works

For each candidate separator the tool splits up to fifty lines and counts the fields per line. A separator that gives the same number of fields on nearly every line, and more than one field, scores best. That is why a comma inside a quoted address does not usually fool it.

What to do with the answer

If the result is a semicolon and you use Excel in the US, convert to a workbook with CSV to Excel, which reads the separator for you. If the encoding line says Windows-1252 and your accents look wrong elsewhere, use the CSV encoding converter.

For a full count of rows, columns and ragged lines, run the CSV row counter.

4FAQ

Questions, answered

How can I tell if my CSV uses commas or semicolons?+

Paste a few lines or open the file here, and the report names the separator.

Is the text I paste stored or sent?+

No. The check runs in your browser and nothing is uploaded.

Why does my CSV open in one column in Excel?+

Excel expected a different separator than the file uses. This tool tells you which one it is.

Can it detect tabs and pipes?+

Yes, along with colons and, as a last resort, spaces.

Does it show the file encoding?+

Yes, along with whether a BOM is present and which line endings are used.

Does it work on a phone?+

Yes, you can even paste a few lines into the box.

+Keep going

Related tools