Offline JSON to CSV and YAML to JSON Converter for Mac
Convert JSON to CSV, CSV to JSON and YAML to JSON on a Mac without uploading anything: a Python script, Bytepliers, and CLI and Shortcuts for batches.
GuideUpdated 7 min read
On this page
You need to turn a JSON, CSV or YAML file into another format, and you don't want to paste company data into a website. Most converters that rank for this are web pages, and the offline answers people share are scattered: a desktop viewer here, a command-line tool there. This guide covers the free built-in route first, then the offline options in Bytepliers, with their limits.
We make Bytepliers, so weigh our view accordingly. The Python route is free and enough for simple cases, and we say where it stops working.
Which method fits
| Method | Good for | Stops working when |
|---|---|---|
| Python script (free) | Flat JSON array of objects to CSV | Nested objects, YAML, or you want a preview |
| Bytepliers app | JSON ↔ CSV, YAML ↔ JSON, nested JSON, checking output before saving | Input over 2 MB (the limit for most text tools, including YAML ↔ JSON) |
| Bytepliers CLI or Shortcuts | Folders of files, repeatable jobs | Same 2 MB limit; needs the app installed, and licensed or in trial |
Why "offline" is harder than it looks
Web converters are the first result for nearly every query, and they upload your data to a server or at least run unknown scripts in a page. Offline options exist, but each covers a slice: some only do JSON to CSV, some are command-line only, and none of the Mac's built-in tools converts between these three formats directly. Python, which ships with the Command Line Tools, covers the simplest case well. Anything involving YAML, nesting or batches needs more.
YAML conversion also has a real accuracy issue in any tool. JSON has no comments, so YAML comments are lost. YAML 1.1 words like yes and no may be read as booleans by some parsers and as strings by others. Know what your converter does before you trust the output.
Convert JSON to CSV offline with Python (free)
This works for a JSON file that is an array of flat objects, like [{"id":1,"name":"a"},{"id":2,"name":"b"}]. If python3 --version prints a version in Terminal, you have Python 3. If not, macOS may offer to install the Command Line Tools, which include it.
Save this as json2csv.py:
import csv, json, sys
with open(sys.argv[1], encoding="utf-8") as f:
rows = json.load(f)
fields = []
for row in rows:
for key in row:
if key not in fields:
fields.append(key)
with open(sys.argv[2], "w", newline="", encoding="utf-8") as out:
writer = csv.DictWriter(out, fieldnames=fields)
writer.writeheader()
writer.writerows(rows)Run it from the folder that holds your file:
python3 json2csv.py data.json data.csvThis reads data.json and writes data.csv. It overwrites data.csv if that file already exists. To undo, delete the new CSV; the JSON is never changed.
What the script does not do: it does not flatten nested objects (a nested value is written as raw Python text in one cell), it does not accept {"data": [...]} wrappers, and it fails on JSON with comments or trailing commas. It does nothing for YAML.
Convert JSON to CSV in Bytepliers
- Open Bytepliers. In the sidebar under Convert, choose CSV ↔ JSON. (Or press ⌘K and type "csv".)
- Set the mode to JSON → CSV.
- Paste your JSON with ⌘V, drop the file on the editor, or press ⌘O to open it.
- Check the status line ("N rows × M columns") and the Table preview.
- Copy the output with ⇧⌘C, or save it with Save… (⌘S).
In this mode, Flatten objects (on by default) turns nested objects into dotted columns such as user.name.
The Table preview shows only the first 500 rows ("first N of M rows"). Compare the status line's row count with your source before relying on a large conversion.
If your JSON is broken (comments, trailing commas, single quotes), paste it into JSON Formatter first. Its default Lenient mode repairs those and reports "Repaired N issues". Copy the strict output into CSV ↔ JSON afterwards. More in the JSON Formatter docs.
Convert CSV to JSON in Bytepliers
Use the same tool in its default mode, CSV → JSON.
| Option | What it does | Default |
|---|---|---|
| Delimiter | Auto, ,, ;, Tab or | | Auto |
| Header row | Treats the first row as column names | On |
| Infer types | Reads values as JSON types instead of text; 02134 stays text | On |
The converter follows RFC 4180 quoting, and duplicate headers become id_2-style names instead of overwriting each other. You can open a .csv or .tsv file from Finder with Open With ▸ Bytepliers and it routes to this tool. Bytepliers never becomes the default app for those files.
Convert YAML to JSON (and back) in Bytepliers
Choose YAML ↔ JSON in the Convert group. The default mode is YAML → JSON; JSON → YAML and Swap are one click away. JSON indent can be 2 spaces, 4 spaces or Tab.
It reads a YAML 1.2 subset: block and flow collections, all scalar styles, block scalars, comments, anchors, aliases and << merge keys. Know these behaviors before you trust the output:
- YAML 1.1 values stay strings.
yes,no,on,off,1_000, dates,.infand.nancome out as strings, not booleans or numbers. If a tool downstream expectstrue/false, fix those values in the YAML first. - One document per input. A file with several documents separated by
---is not supported. Split it and convert each part. - Comments are dropped. JSON has no comment syntax.
- Not supported: explicit
?keys, collection or alias keys, custom!tags, and tabs as indentation. You get an error like "Line N: …". - Limits: nesting deeper than 64 levels, aliases that expand to more than 100,000 nodes (about 10 MB), or input over 2 MB.
To go from YAML to CSV in one pass, build a recipe in Pipelines with two steps, YAML → JSON then JSON → CSV. Run it on your clipboard from the menu bar, or from the command line with bytepliers recipe. See Pipelines and recipes.
Convert many files: CLI and Shortcuts
Command line
Open Bytepliers once so the app can write the access pass the command checks. Then install the command in Settings ▸ Integrations ▸ Command-Line Tool ▸ Install…. For one file:
bytepliers json-to-csv -i data.json > data.csvThis reads data.json and writes data.csv (it overwrites an existing data.csv). The other transform names are csv-to-json, yaml-to-json and json-to-yaml. To convert every JSON file in a folder into a csv subfolder:
mkdir -p csv
for f in *.json; do
bytepliers json-to-csv -i "$f" > "csv/${f%.json}.csv" || echo "failed: $f"
doneThe loop never touches the source files; to undo it, delete the csv folder. A file that fails still leaves an empty CSV behind, so check the "failed:" lines. These transforms take no arguments, so convert one file in the app first and confirm the output before a large batch. Exit status 1 means a conversion failed, and the error goes to stderr with a line:col: position. See the command-line docs.
Shortcuts
The Shortcuts action Transform Text takes a "Text" input and a "Transform" choice. The list includes JSON → CSV, CSV → JSON, YAML → JSON and JSON → YAML. It returns text, so you can pass the result to other actions. More in Shortcuts, Services, Raycast and Alfred.
Is it really offline?
The conversion tools make no network requests, and Bytepliers has no analytics or telemetry. The app does contact Polar to check the license and macsuite.app for updates. A licensed app keeps working offline for up to 7 days between license checks.
Bytepliers is part of MacSuite: a 7-day free trial per app, then $349 one-time for every MacSuite app on up to 3 Macs (as of November 2026). See pricing or the Bytepliers page.
Checklist before you trust a conversion
- The row count in the status line matches your source.
- Delimiter is what you expect (not auto-detected wrongly).
- Text-like values such as ZIP codes and IDs stayed text.
- YAML values like
yes/nowere meant to be strings. - Source YAML had one document and no comments you need to keep.
If nothing works
- "Input is 3.1 MB — the limit for live conversion is 2 MB." (The size varies.) Live tools, recipes and the CLI refuse input over 2 MB. Split the file, or use the Python script for the JSON → CSV case.
- Columns split in the wrong place. Set Delimiter yourself.
- Numbers or other types when you wanted text. Turn Infer types off in CSV → JSON mode.
- Nested JSON in one messy cell. Turn Flatten objects on in JSON → CSV mode. If you get dotted columns you didn't want, turn it off.
- A YAML error says "Line N: …". Look for tab indentation, a second
---document, or custom tags. - The CLI says "Open Bytepliers once to enable the command-line tool." Launch the app, then retry. After the trial ends, the CLI also needs a license.
- The CLI says "not UTF-8 text". Re-save the file as UTF-8. Files over 100 MB are refused.
If it still fails, contact support through our support page with this:
Subject: Bytepliers conversion problem
Tool: CSV ↔ JSON (or YAML ↔ JSON / CLI)
Mode: JSON → CSV
Exact message: <paste the error text>
Input size: about X MB, N rows
Steps tried: changed delimiter, turned Infer types off
macOS version and Bytepliers version: <fill in>Common questions
Can it convert multi-document YAML?
No. It handles one document per input. Split the file at the --- lines and convert each part.
Will yes and no become booleans?
No. They stay strings. Edit the YAML to true/false first if you need booleans.
Does it need an account?
No. You enter the license key from your purchase email, or use the 7-day trial.
Is the Python script enough for me?
If your JSON is a flat array of objects and you convert occasionally, yes. Switch to an app when you hit nesting, YAML, previews or folders of files.