Description
node-firestore-import-export is a tool for exporting, importing and clearing Firestore databases. An export writes a JSON file that keeps the collections and documents in their original structure, with a __collections__ entry for the subcollections under each document. Timestamps, geopoints and document references are each stored in a special format, so they can be restored. Imports need a file with the same structure, such as one from an export, and the README warns that importing into the wrong location can overwrite or damage data. You install it with npm or yarn, or from the source. To connect, you download a service account private key from the Firebase console, under Project Settings and then Service Accounts. The path to the key can be passed with the -a or --accountCredentials flag, or set in an environment variable. When the FIRESTORE_EMULATOR_HOST variable is set, the commands use the Firebase emulator instead of the account credentials. The tool can be used on the command line or as a library, with export, import and clear functions.…
Highlights
- Export Firestore collections and documents to JSON
- Import from a matching JSON file
- Clear data from a database
- Supports Firebase emulator
- Command line and library use
Ratings & Reviews
No ratings yet
Be the first to rate Node Firestore Import Export.
People also visit

firebase-security-rules-auditor
Automated security auditor for Firestore rules using red-team methodology
Node Firestore Import Export FAQ
What does it do?
It exports a Firestore database to JSON, imports that JSON back, and clears data, while keeping the collection structure.
How do I connect to my project?
Download a private key for a service account from the Firebase console, under Project Settings and then Service Accounts. Pass the file with -a or --accountCredentials.
Can I use it with the emulator?
Yes. If FIRESTORE_EMULATOR_HOST is set, the export, import and clear commands use the emulator instead of your credentials.
Are there any risks?
Yes. The README warns that importing to the wrong location can easily overwrite or mess up your data.
How do I install it?
With npm or yarn, or by downloading the source.
What are the best Node Firestore Import Export alternatives?
Popular alternatives to Node Firestore Import Export include Meteor-Files, Datasette ChatGPT plugin and SheetSQL. See all Node Firestore Import Export alternatives









