FileDial › Guides › Documents, spreadsheets and slides

How to convert a CSV file to JSON on a Mac

By Himanshu Ranjan · Updated 8 November 2026

Select the CSV in Finder, open FileDial and choose Data › Convert CSV to JSON. The first row becomes the keys. For spreadsheets, Convert › Convert to JSON writes one JSON file per sheet. Both run offline on your Mac.

Two tools, two inputs

FileDial has two routes. Data › Convert CSV to JSON is for CSV files: the first row becomes the keys. Convert › Convert to JSON is listed for spreadsheets and writes one JSON file per sheet, again with the first row as the keys.

So each row of data becomes an object whose keys are your column headings. That is the shape most APIs, JavaScript apps and config loaders expect.

Steps

Make sure row one holds clean headings before you start.

  1. Open the CSV in a text editor and confirm the first row is the header, with no blank or duplicate column names.
  2. Select the file in Finder.
  3. Open the dial and choose Data, then Convert CSV to JSON. For an Excel file, choose Convert, then Convert to JSON.
  4. Open the JSON and check a few objects, especially values that look like numbers or dates.

Types: what JSON can and cannot say

JSON, created by Douglas Crockford in the early 2000s and now defined by RFC 8259 and ECMA-404, has strings, numbers, booleans, arrays, objects and null. A CSV has no type information at all: the text 1 and the number 1 look the same. So type decisions have to be checked after conversion.

Pay attention to identifiers with leading zeros, which belong as strings, to dates, which JSON has no native type for, and to empty cells, since CSV does not distinguish null from empty.

Related conversions

If you want a queryable file instead, Data › Convert to SQLite writes one table named after the file and infers integer, real and text types. For XML sources, Data › Convert XML to JSON turns attributes into @name keys and repeated elements into lists, with values staying text.

Built-in alternative

macOS has no built-in CSV to JSON converter. Numbers does not export JSON. Scripting with Python or a Shortcuts workflow works but needs you to write and test it, and handling quoted commas correctly is easy to get wrong. A tool built for it saves that effort, and avoids pasting data into a website.

What the JSON looks like

With a header of name, email, plan and two data rows, you get a list of two objects, each with those three keys. Values come from the cells. That shape suits most APIs, front-end prototypes, fixtures and config loaders, and it is easy to read.

Keys come straight from your header row, so clean them first. Spaces and punctuation in column names become awkward keys, and duplicate names collide. Rename the headings in a spreadsheet before converting if you want tidy keys such as first_name instead of First Name (as entered).

Common mistakes and when FileDial fits

Validate the output in your own tooling. Look at numbers that should be strings, such as phone numbers and postcodes, and at empty cells. Large files are fine to convert, but very large ones are better split with Data › Split CSV every N rows… so that each JSON stays easy to open.

JSON has no comment syntax, and its numbers have no separate integer type, so a column of large identifiers can lose precision in some parsers. If your IDs are long, treat them as strings in the consuming code.

It is a good fit for turning spreadsheet or CSV exports into JSON for apps, tests and prototypes, without pasting data into a website. It does what the note says and nothing more: the first row becomes keys.

It is not a schema tool. If you need nested objects, typed fields or specific key naming, plan to post-process the output, or write the transformation in code. Keep the original CSV as the source of truth, and treat the JSON as a build artifact you can regenerate.

Using a header row with duplicate or empty names comes first, because keys must be unique to be useful. Second is assuming numbers will be typed correctly in the output; check IDs and codes. Third is trying to represent hierarchical data in a flat CSV and expecting nesting to appear. Fourth is treating dates as a JSON type: JSON has none, so they are strings, and the format needs agreeing with whoever reads the file.

If a consumer rejects your JSON, validate it in a JSON validator before blaming the data. A stray byte-order mark at the start of a file is a common cause, and Developer › Remove BOM deals with it.

Questions

Which FileDial tool converts CSV to JSON?

Use Data › Convert CSV to JSON for CSV files, where the first row becomes the keys. For Excel and other spreadsheets, Convert › Convert to JSON writes one JSON file per sheet, again using the first row as keys. Both run on your Mac with no upload.

Are numbers kept as numbers in the JSON?

CSV has no type information, so you should check the output for your columns. Identifiers such as phone numbers and codes with leading zeros belong as strings. Open the JSON, look at a few objects with both kinds of value, and fix the source or the consuming code if needed.

Does it work offline, and does it change my CSV?

It works with Wi-Fi off because every FileDial tool runs on your Mac, and nothing is uploaded. It does not change the CSV: a new JSON file is created beside it and the original is kept. Each result also has Undo if you want to remove it.

Sources

  1. Wikipedia: JSON
  2. Wikipedia: Comma-separated values

Related

Try FileDial free for 1 daySee the dialNo card, no account. Then $20 once, for 2 Macs. Runs offline on macOS 14+ (Apple silicon).