CSV to JSON for Firebase Import
Firebase Realtime Database and Firestore both accept JSON for bulk imports through the admin tooling and SDKs.
Native JSON tool
CSV to JSON
Keyed-object output
Array for Firestore SDK
Type-inferred values
Browser-only conversion
- Cost
- Free tier
- Sign-up
- Not required
- Processing
- Tool-specific
- Privacy
- Clearly disclosed
Add this CSV to JSON to your website
Drop the CSV to JSON into a blog post, product docs, intranet, or school portal with one iframe. Processing, privacy, and usage limits are the same as on the full tool page.
- One copy-ready line of HTML
- Responsive — adapts to any container width
- No API credentials are placed in the snippet
Embed code
<iframe
src="https://www.fixtools.io/json/csv-to-json?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="CSV to JSON by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
Firebase import shapes and how the converter produces them
Firebase Realtime Database stores data as a giant JSON tree. The import flow accepts a JSON file where the top-level structure is an object whose keys are the unique IDs of your records and whose values are the record objects themselves. This shape lets the import engine merge into existing data without collisions. A flat array would not work because there are no keys to merge by. FixTools produces this keyed-object shape when you select a column from your CSV to use as the key. Pick the ID column, click Convert, and the output is an object with that column dropped out of each value (since it lives in the key) and assigned as the key itself.
Firestore organises data into collections of documents. Bulk import is typically done through an admin SDK script rather than a UI file upload. The script iterates a JSON array of document objects and calls set or add for each. The standard JSON array shape from FixTools works perfectly for this pattern: each element becomes one document, and the script can optionally use a particular field as the document ID via set(docId, data). Type inference produces real numbers and booleans, which matter for Firestore because the field types affect indexing and querying behaviour.
For both Realtime Database and Firestore, nested object structures are common because Firebase encourages denormalised data shapes. The dot-notation headers feature in FixTools makes building nested records from flat CSV rows straightforward. A CSV with headers like name, address.city, address.zip, contact.email produces JSON records with nested address and contact objects in the output, ready to import directly without further manipulation. This avoids the need to write transformation code between the CSV source and the Firebase import step.
Privacy considerations apply strongly to Firebase imports because the data is usually customer-facing. Uploading customer records to a third-party converter before importing to Firebase undoes the privacy posture you set up for the database itself. FixTools converts in the browser with no upload, so the data path is CSV in your browser, JSON in your browser, then directly to Firebase via the admin SDK or import UI. No intermediate cloud service touches the data.
How to use this tool
For Realtime Database, select a key column to get keyed-object output. For Firestore, use the default array and seed via the admin SDK.
How It Works
Step-by-step guide to csv to json for firebase import:
- 1
Identify your key column
In your CSV, the column that holds unique record IDs is the key for Realtime Database. For Firestore, you can either use an ID column or let Firestore auto-generate IDs at write time.
- 2
Convert with the right shape
For Realtime Database, enable Use Column as Key and select the ID column. For Firestore via SDK, leave the default array output enabled.
- 3
Inspect the structure
Check the preview. Realtime Database output should be an object with IDs as keys. Firestore output should be an array of document objects suitable for SDK iteration.
- 4
Import to Firebase
For Realtime Database, use the Firebase Console import feature or the REST API to upload the JSON. For Firestore, run your admin SDK seed script with the JSON file as input.
- 5
Verify in the console
Open the Firebase Console and spot-check that the records appear with the expected structure and field types. Type inference should give you real numbers and booleans rather than every field as strings.
Real-world examples
Common situations where this approach makes a real difference:
Seeding a new Realtime Database project
A developer launching a new Firebase project needs to load 500 initial records from a spreadsheet. Converting with keyed-object output and importing via the console takes minutes instead of writing a custom seed script.
Firestore product catalog
An e-commerce team maintains a product catalog in Google Sheets. Converting to JSON and running a Firestore seed script keeps the catalog updates in spreadsheet workflows while the production data lives in Firestore.
Migrating from another database
A team moving from MongoDB to Firestore exports their collection as CSV, converts to JSON, and uses the admin SDK to import. The CSV is the intermediate format that makes the migration tractable.
Test data for the emulator
A QA engineer seeds the Firebase emulator with realistic test data for integration tests. CSV authoring is easier than JSON, and the converter bridges the two formats in seconds.
When to use this guide
When you are seeding Firebase Realtime Database or Firestore from spreadsheet data.
Pro tips
Get better results with these expert suggestions:
Choose the right shape for your import method
Realtime Database console import expects keyed-object format. Firestore admin SDK seeding expects an array. Picking the wrong shape forces you to transform after conversion, which is avoidable by selecting the right output mode upfront.
Use nested headers for denormalised data
Firebase encourages denormalised data with nested objects. Dot-notation headers in the CSV produce nested JSON ready to import without further reshaping. Plan the nesting structure before authoring the spreadsheet.
Type carefully for query performance
Firestore indexing depends on field types. A field that should be numeric but lands as a string indexes differently and breaks range queries. Verify type inference produced the right types before importing large datasets.
Use a small batch to validate first
Before importing thousands of records, import a five-record sample first and verify the shape and types are correct in the console. Catching a shape mismatch on five records is much cheaper than on five thousand.
Frequently asked questions
Related guides
More use-case guides for the same tool:
Related tools
Other tools you might find useful:
Ready to get started?
Open CSV to JSON to review its free limits and processing method.
Try the CSV to JSON converterFree tier · No account needed · Transparent limits