Convert MongoDB or Firestore JSON Export to CSV

Overview

MongoDB's mongoexport and Firestore's export tools produce JSON or NDJSON. Paste the JSON array and convert it to CSV for analysis in Excel, import into another database, or sharing with stakeholders who work in spreadsheets.

How to Use This Tool

Paste the JSON array from your database export. If the export is NDJSON (one JSON object per line), wrap it in [ ] brackets first to make it a valid JSON array. Click Convert and download the CSV.

Ready to get started? It's free, no registration required, and your files never leave your device.

PDF Tool

Frequently Asked Questions

How do I handle MongoDB's _id field in the CSV?

MongoDB's _id field appears as a column in the CSV. If the _id is an ObjectId, it exports as a string representation (e.g. {$oid: '...'}) which appears as a JSON string in the CSV cell.

What is NDJSON and how do I convert it?

NDJSON (Newline Delimited JSON) has one JSON object per line, with no surrounding array brackets. To convert: open the file, wrap all lines in square brackets [ ], and add commas between objects. Then paste into the converter.

Can I convert a Firestore export to CSV?

Firestore's JSON export includes metadata. Extract the documents array from the export, remove the Firestore-specific type wrappers if needed, and paste the cleaned JSON array into the converter.