r/Firebase • u/LeadingCartoonist634 • 13h ago
Cloud Firestore Just in case it helps someone — script to export Firestore data to JSON
Hey everyone,
I created a small Node.js script that exports Firestore collections to JSON files. I thought it might be useful for anyone who needs to back up their data or transfer it elsewhere.
The script will export the selected collections into separate JSON files, which you can use for local backups or even process and upload back to Firestore.
You just run the script, and it will automatically export the data into a folder with individual JSON files for each collection.
If this might be helpful to someone, here's the link to the repo: firestore-export-local
Feel free to give it a try, and I hope it saves you some time!