How to convert a mongodb json export to csv
- Step 1Run mongoexport — Use mongoexport --uri ... --collection X --out export.json (NDJSON by default) or --jsonArray for an array.
- Step 2Drop the export file on this tool — Auto-detect handles both NDJSON and array forms — pick the explicit format if the file is large.
- Step 3Leave flattening on — Embedded documents become dot-notation columns; arrays serialise per your chosen mode.
- Step 4Open in Excel or upload to a warehouse — Hand off to analysts as a CSV, or bulk-load into Snowflake / BigQuery from the same file.
Frequently asked questions
How are ObjectId values rendered?+
MongoDB extended JSON serialises ObjectId as { "$oid": "..." }. Flattening produces a column named _id.$oid with the hex string — rename via the CSV Header Rename tool if needed.
Why are some rows missing columns?+
MongoDB schemas are flexible — not every document has every field. Missing keys produce empty cells; the column header remains so the CSV is rectangular.
Can I round-trip back to MongoDB?+
Use the CSV →’ JSON tool to produce NDJSON for mongoimport. Note that ObjectId and ISODate wrappers will need restoring with a script if you want them typed.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.