Free · Fast · Privacy-first

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

Runs in your browser
JSON output
Run the tool to see a task-specific result.

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
IframeResponsiveAttribution included

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. 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. 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. 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. 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. 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:

1

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.

2

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.

3

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.

4

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.

5

6

7

FAQ

Frequently asked questions

Open the Firebase Console, navigate to your Realtime Database, click the three-dot menu, and choose Import JSON. Select the file you downloaded from the converter. The import merges into your existing data tree. Use keyed-object output from the converter for clean merging.
Firestore does not have a built-in JSON import in the console. Import is done through admin SDK scripts that iterate a JSON array and call set or add for each document. The standard array shape from the converter works directly with this pattern.
In the converter settings, enable Use Column as Key and select the column from your CSV that holds unique IDs. The output becomes an object where each ID maps to its record, with the ID column removed from the values since it lives in the key.
Yes. Firestore indexes fields by type, and range queries only work within a single type. A field that should be numeric but is stored as a string will not respond to numeric range queries. Verify type inference is correct before importing.
Yes. Both Realtime Database and Firestore support nested objects natively. Use dot-notation headers in your CSV to produce nested JSON ready to import. Firebase queries can index nested fields using the same dot-notation.
Realtime Database import merges at the top level, replacing keys that exist in the import and leaving others alone. Firestore set calls overwrite documents by ID; use update or merge:true to preserve fields not in the import.
Yes. FixTools converts in your browser with no upload. The data path is CSV to JSON to Firebase, all under your control. No intermediate cloud service touches the data, which matters for customer records that will live in your Firebase project.
Realtime Database imports are limited to 256MB per file in practice. Firestore admin SDK seeding has no hard limit but writes are throttled to 500 per second. For very large datasets, split the JSON and run multiple imports.

Related guides

More use-case guides for the same tool:

Ready to get started?

Open CSV to JSON to review its free limits and processing method.

Try the CSV to JSON converter

Free tier · No account needed · Transparent limits

Source-backed reference

JSON standards quick reference

Concise, standards-backed facts for developers working with JSON debugging and validation. Each rule links to a primary specification so it can be independently verified before you rely on it in code, documentation, or an incident report.

JSON standard
RFC 8259 defines JSON as a text format for serializing structured data. JSON values may be objects, arrays, strings, numbers, true, false, or null.
Verify in RFC 8259
Strings and object keys
JSON strings and object member names use double quotation marks. Single-quoted strings are not valid JSON syntax.
Verify in RFC 8259 §7
Trailing commas
The JSON grammar does not allow a comma after the final member of an object or the final element of an array.
Verify in RFC 8259 §4–5
Interoperability
ECMA-404 describes the JSON syntax independently of any programming language, which is why standard parsers can exchange the same JSON text across runtimes.
Verify in ECMA-404

Common invalid → valid JSON examples

Trailing comma

{"a":1,}{"a":1}

Single-quoted key

{'a':1}{"a":1}

Unsupported literal

{"score":NaN}{"score":null}

Built for verification, not just extraction

Direct answers are paired with primary sources and concrete examples. That makes this page useful to developers and also gives search and answer systems a clear, verifiable statement to reference instead of an unsupported summary.