Convert CSV to JSON on Mac without type surprises
Local conversion keeps the text on your Mac, but it can still turn blanks into nulls, yes into true, 00123 into 123, and duplicate headers into one key.
The short answer: paste a working copy into TeenyTool, set the header option, then compare the source with the JSON using the converter's actual rules. Check key names, object count, missing and empty values, leading-zero IDs, duplicate headers, and rows that are shorter or wider than the header.
This guide is for small product exports, support lists, research tables, QA fixtures, and one-off data handoffs. TeenyTool produces a pretty-printed JSON array locally from pasted CSV text. It does not choose a destination schema, support non-comma delimiters in this utility, or report every malformed-table condition.
TeenyTool is a $14.99 lifetime Mac app with a 3-day trial. I build it, so the recommendation is intentionally narrow: use it for a manual conversion you can inspect. Use a script, database tool, or data pipeline when the file is large, the job repeats, or validation must be enforced.
TeenyTool's CSV to JSON contract
| Input case | Current output behavior | Review action |
|---|---|---|
| First row is a header | Header values become object keys. | Require present, unique, destination-ready names. |
| No header row | Keys become col0, col1, and later positions. |
Rename or map generated keys before a real import. |
| Blank, true/false, yes/no, null/nil, integer, or decimal | The value is converted to a JSON null, boolean, or number when it matches those rules. | Confirm that text-like IDs, codes, and blank semantics survive. |
| Short or wide row | Missing header positions become null. Values beyond header width are omitted. | Fix the row shape before relying on the output. |
| Duplicate or empty header | Repeated names target the same JSON key; an empty header becomes an empty key. | Rename headers because the converter does not reject them. |
01Keep the raw CSV and write the expected result
Save the original file before opening it in a spreadsheet or converter. Record its source, export time, filter, and data-row count. Use a copy for conversion so the source evidence stays intact.
Write down the expected headers and the fields that must remain text. A file named 2026-08-03-active-customers-export-raw.csv carries more context than customers.csv. A note that customer_id must preserve leading zeros is more useful than discovering the loss after import.
Confirm whether row 1 contains field names before conversion. If it contains name,email,status, keep the header switch on. If row 1 is a real record, turn it off and expect generated keys such as col0. Also write down whether the destination distinguishes an empty string from null.
02Build a small conversion fixture
RFC 4180 describes common CSV behavior for comma-separated fields, optional headers, quoted fields, doubled quotes, and line breaks inside quotes. TeenyTool's current utility is comma-specific. It does not expose delimiter, encoding, or schema controls, so normalize other formats before pasting them.
Make a short fixture that includes:
- A comma inside a quoted field and a doubled quote inside text.
- A quoted line break and a non-ASCII name.
- An empty field plus the literal words
nullandnil. yes,no,true, andfalse.- An integer, a decimal, and a leading-zero value such as
00123. - One short row, one extra-wide row, and duplicate header names.
Convert the fixture before the full data copy. It exposes the exact transformations with a handful of rows and gives you an expected-output record for the handoff.
03Paste the copy and set the header switch
Open teenytool from the menu bar, choose the CSV and JSON utility, paste the working copy, set First row is header, then convert. The output is a pretty-printed JSON array, and the interface shows the converted row count.
The current Swift parser handles quoted fields, doubled quotes, commas and line breaks inside quotes, and CRLF or LF endings. With the header switch off, it generates keys such as col0. It also skips a row when every parsed field is empty, so compare the displayed count with the source's nonblank data rows.
Keeping the conversion local protects the file from an online upload. It does not prove that the structure or values are correct. Review the output before copying it into another system.
04Check the exact coercion order
The converter checks an empty value first, then case-insensitive booleans and null words, then integers, then decimals. Everything else stays a string. That means an empty field becomes JSON null, YES becomes true, and 00123 becomes the number 123.
Compare the first record, last record, and every fixture row with the source. Pay special attention to IDs, SKUs, postal codes, account numbers, blanks, and literal words that resemble null or boolean values. The utility has no schema control for forcing those values to remain strings.
RFC 8259 requires UTF-8 for JSON exchanged outside a closed ecosystem. Also check whether the destination expects a top-level array of objects, because valid JSON can still be the wrong shape for an import or API.
05Reject duplicate headers and uneven rows first
The current converter does not stop on duplicate or empty headers. A later value under a repeated header replaces the earlier value in that JSON object. An empty header becomes an empty-string key.
Rows are matched to the header width. A short row gets null for missing positions, while extra values in a wider row are omitted. The current parser also does not reject an unclosed quoted field. Repair uncertain structure with a dedicated validator or script before conversion.
Use a tested script or data pipeline when the file is too large to review, the conversion repeats, or the destination requires a strict schema. For the broader evidence workflow, use the TeenyApps Mac data review checklist. If the review spans a laptop and monitor, pair it with the TeenyDisplay spreadsheet review setup.
Eight-minute CSV to JSON check
- Save the source unchanged and note its row count.
- Write the expected headers and text-only fields.
- Build a fixture with quotes, blanks, types, and uneven rows.
- Paste the working copy and set the header switch.
- Compare the converted count with nonblank source rows.
- Check coercion-sensitive values against the source.
- Reject duplicate headers and uneven rows.
- Record the destination schema and any accepted transformation.
Sources checked
- TeenyTool and the current local Swift source for the CSV and JSON view, checked for input controls, parsing, type coercion, row handling, output shape, trial, and lifetime price.
- RFC 4180 for common CSV field, header, quote, and line-break behavior.
- RFC 8259 for the JSON data interchange format and UTF-8 requirement.
- W3C Model for Tabular Data and Metadata on the Web for row, column, cell, and table structure.
- TeenyApps Mac data review checklist for the broader source-file and display-review workflow.
Common questions
Can TeenyTool convert CSV to JSON offline?
Yes. TeenyTool's CSV and JSON utility runs inside the Mac app. Normal CSV to JSON conversion does not need to upload the file to a website.
Which CSV values does TeenyTool convert to JSON types?
Empty fields and the words null or nil become JSON null. True and yes become true; false and no become false. Integer-looking values convert to integers, then decimal-looking values convert to numbers. Other values remain strings, so review identifiers and codes before using the output.
What happens to short rows, extra fields, and duplicate CSV headers?
A short row gets null for missing header positions. Values beyond the header width are omitted. Duplicate header names map to the same JSON key, so a later value replaces an earlier value. Rename duplicate or empty headers and fix uneven rows before conversion.
Convert the file where you can inspect it.
teenytool is a $14.99 Mac menu bar toolbox with CSV to JSON, JSON Formatter, JSON Diff, JWT Decoder, Base64, URL tools, color tools, PDF tools, and more.