Export CSV from Firebase Firestore

Export CSV from Firebase Firestore

With Firefoo you can export collections to CSV with just a few clicks so that you can ge your data into Airtable, Google Sheets or Excel.

How to Export Firestore Collections as CSV

1
Download and install Firefoo
2
If prompted, sign in with Google
3
Right-click the collection in the sidebar and select Export Collection
default
5
Make sure the CSV Format is selected and click the Export button
default
Your collection is exported to CSV and a progress popup opens. If you close that popup, the export will still continue to run in the background. Get back to the progress popup again through FileTasks.

Order and Limit

Select the Limit docs per Collection option to limit the total number of rows to export. If unselected, Firefoo is able to export millions of documents. Rows are not sorted by the date they were created or last modified. Instead the default ordering is by their document ID, which is randomly generated usually. To export in another order, read on about how to export the result of a query on your collection.

Export Firestore Query Results to CSV

You can export the results of a specific query with where and order-by clauses to CSV.
1
Click the collection in the sidebar on the left
2
Add Where conditions and Order by clauses. Adjust the number of documents with the Limit field, click the Run button to run your query!
3
Click the Export Results icon as seen in the screenshot below
default
5
Select the file destination in the file chooser
Click the collection in the sidebar on the left. Add Where conditions and Order by clauses. Adjust the number of documents with the Limit field, click the Run button to run your query! Click the Export Results icon as seen in the screenshot below.

Date Format

Date Format When exporting query results, by default timestamps are formatted as you see them in the table, which you can configure in the Output Options, reachable from the toolbar button. Instead you can choose the ISO 8601 date format, e.g. 2021–11–23T23:13:52.000Z. This should be your preferred option if you plan to import the CSV into another app, as it is widely supported.

Export Subcollections to CSV

If you want to export a single subcollection to CSV, instead of one of the root-level collections, that’s also possible! Subcollections are not shown in the sidebar. That’s why you have to locate the subcollection in the Tree view (not the Table view) and open the right-click context menu from there. Choose Export and the same export dialog as above appears.

Data Type Format

Array and Map fields in are serialized to JSON during the export to CSV.
  • Map: {"field1": "value1", "field2": 42, "field3": false}
  • Array: ["hello", true, 42]
  • Geopoint: Lat: 52.5200084 Lon: 13.4049542
  • Timestamp: 2021–11–23T13:11:52.000Z

FAQ

How many requests will this take away from my quota?

Firefoo uses one read request for every document that is exported into the CSV.

How to import the JSON Collections into Firestore?

Right-click on the target database in the sidebar and select Import Collections. In the Import Dialog, choose the CSV file and specify the target collection name in the Target Path field.