JSON To Firebase List

Login

Email
Password

Don't have an account yet?

Go to Sign up

Input Data
Sample {{ showCoderInput ? 'Choose File' : 'Enter Data' }}

                                
Valid JSON Invalid JSON — Cannot convert to JSON Array
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert JSON to Firebase online — paste, edit, and download Firebase.

Path:
Root path in Firebase Realtime Database.
Key Type:
Push Key Array Index Custom Key Push Key: auto-generated unique key. Array Index: use numeric index. Custom Key: use a field from data.
Custom Key Field:
Specify which field to use as the key for each item.
Indent:
2 Spaces 4 Spaces Tab Minified JSON indentation for the output format.
Output Options:
Wrap with Path Include Null Values
Wrap with Path: wrap output in a path root node. Include Null Values: keep fields with null values in output.
Convert Restart

JSON to Firebase List — Free Online Firebase Realtime Database Converter

What Is Firebase Realtime Database?

Firebase Realtime Database (RTDB) is a cloud-hosted NoSQL database from Google that stores data as a JSON tree. Changes synchronize in real-time to all connected clients within milliseconds.

Key properties:

PropertyDescription
JSON treeAll data stored as a single nested JSON tree
Real-time syncChanges propagate to all clients instantly
Offline supportSDK caches data locally when offline
NoSQLNo tables, no SQL — just paths and values
Security rulesDeclarative rules control read/write access
Auto-scalingHandles millions of concurrent connections

Firebase Realtime Database Structure

Data in RTDB is a JSON tree addressed by paths:

https://your-project.firebaseio.com/users/-Mabc123/name
                                 ↑ path   ↑ key    ↑ field

{
 "users": {
   "-Mabc123": {
     "name": "Alice",
     "age": 30,
     "active": true
   },
   "-Mdef456": {
     "name": "Bob",
     "age": 25,
     "active": false
   }
 }
}

Key Types in Firebase

Key TypeExampleWhen to Use
Push Key-Mabc123xyzNew records with unique auto-generated IDs (default for lists)
Array Index0, 1, 2Ordered lists where position matters (not recommended for most cases)
Custom Keyuser_001, aliceNatural keys from your data (email, SKU, slug)

Firebase push keys are auto-generated 20-character strings (e.g., -Mabc123xyz). They are:

  • Chronologically ordered — newer keys sort after older ones

  • Globally unique — no collisions across clients

  • Collision-free for offline — generated without server round-trip

  • Uniformly distributed — no hot-spotting in database sharding

Array indices (0, 1, 2) are discouraged because:

  • Inserting or deleting items shifts all indices

  • Concurrent modifications cause data loss

  • Firebase documentation recommends against using array indices as keys

Why Convert JSON to Firebase Format?

Use CaseDescription
Database seedingPopulate RTDB with initial data for development or demos
Data migrationMigrate data from another system into Firebase
Bulk importImport hundreds or thousands of records at once
Staging environmentsSet up test data in staging Firebase projects
Content managementUpload CMS content into Firebase for mobile/web apps
Game dataImport game configurations, levels, or leaderboards
Catalog dataUpload product catalogs into Firebase for e-commerce apps

Core Features

1. Dual Input Modes

  • File Upload: Drag and drop or select a .json file.

  • Code Editor: Paste or type raw JSON with syntax highlighting and real-time validation.

2. Path

Set the root path in the Firebase Realtime Database where data will be stored.

Path ValueOutput Structure
users{"users": {...}}
app/data/users{"app": {"data": {"users": {...}}}}
(empty)No path wrapper — raw list output

3. Key Type

Controls how each item in the JSON array is keyed in the Firebase output.

Auto-generates unique Firebase-style push keys for each item.

Input:

[
   {"name": "Alice", "age": 30},
   {"name": "Bob", "age": 25}
]

Output:

{
   "-Mabc123xyz": {"name": "Alice", "age": 30},
   "-Mdef456uvw": {"name": "Bob", "age": 25}
}

Array Index

Uses numeric indices (0, 1, 2) as keys.

Output:

{
   "0": {"name": "Alice", "age": 30},
   "1": {"name": "Bob", "age": 25}
}

Not recommended for production — concurrent edits cause data loss.

Custom Key

Uses a specified field from each data object as the key.

Configuration: Custom Key Field = "email"

Input:

[
   {"email": "[email protected]", "name": "Alice"},
   {"email": "[email protected]", "name": "Bob"}
]

Output:

{
   "[email protected]": {"email": "[email protected]", "name": "Alice"},
   "[email protected]": {"email": "[email protected]", "name": "Bob"}
}

Custom key values must be strings and unique across all items.

4. Custom Key Field

Specifies which field from the JSON data to use as the Firebase key. Only applicable when Key Type is set to "Custom Key".

Common choices:

FieldExample ValueUse Case
id"user_001"Internal IDs
email"[email protected]"User accounts
sku"PROD-1234"Product catalogs
slug"my-blog-post"CMS content
code"en-US"Locale/region data

Important: Firebase keys must be strings and cannot contain ., #, $, /, [, or ].

5. Indent

Controls the output JSON formatting:

OptionWhen to Use
2 SpacesDefault — clean, readable
4 SpacesDeep nesting — easier to read
TabMatch your project's indentation
MinifiedSmallest file size for upload

6. Output Options

Wrap with Path

Wraps the output in a root node matching the specified Path.

Enabled (path = users):

{
   "users": {
       "-Mabc123": {"name": "Alice"},
       "-Mdef456": {"name": "Bob"}
   }
}

Disabled:

{
   "-Mabc123": {"name": "Alice"},
   "-Mdef456": {"name": "Bob"}
}

Include Null Values

Controls whether fields with null values are kept in the output.

Enabled: {"name": "Alice", "phone": null}
Disabled: {"name": "Alice"} (phone field removed)

Firebase treats null as deletion — enabling this may cause fields to be deleted on import.

7. Privacy by Design

All processing runs entirely in your browser. No data is uploaded to any server.

How to Use This JSON to Firebase List Converter

Step 1: Provide Your JSON Data

Choose one of two input methods:

  • Upload a file: Click "Choose File" and select a .json file, or drag it into the upload area.

  • Paste data: Click "Enter Data" to switch to the code editor. Paste your JSON array.

Important: The tool expects a JSON array of objects.

Step 2: Configure Firebase Output

Use the Properties panel on the right:

  1. Path: Enter the Firebase path (e.g., users, app/data/products).

  2. Key Type: Choose Push Key (recommended), Array Index, or Custom Key.

  3. Custom Key Field: If using Custom Key, specify the field name (e.g., email).

  4. Indent: Choose output formatting.

  5. Output Options: Enable Wrap with Path and/or Include Null Values.

Step 3: Convert

Click Convert. The Firebase-compatible JSON appears in the "Output Data" panel.

Step 4: Copy or Download

  • Click Copy to Clipboard to paste into Firebase Console or save as .json.

  • Premium users can click Download File to save.

Complete Example

Example — User List with Push Keys

Input JSON:

[
   {"name": "Alice", "email": "[email protected]", "role": "admin", "active": true},
   {"name": "Bob", "email": "[email protected]", "role": "editor", "active": true},
   {"name": "Charlie", "email": "[email protected]", "role": "viewer", "active": false}
]

Configuration:

  • Path: users

  • Key Type: Push Key

  • Indent: 2 Spaces

  • Wrap with Path: On

  • Include Null Values: Off

Output:

{
 "users": {
       "-Mabc123xyz": {
     "name": "Alice",
     "email": "[email protected]",
     "role": "admin",
     "active": true
   },
   "-Mdef456uvw": {
     "name": "Bob",
     "email": "[email protected]",
     "role": "editor",
     "active": true
   },
   "-Mghi789rst": {
     "name": "Charlie",
     "email": "[email protected]",
     "role": "viewer",
     "active": false
   }
 }
}

Example — Product Catalog with Custom Keys

Input JSON:

[
   {"sku": "LAPTOP-001", "name": "Pro Laptop", "price": 1299.99, "stock": 45},
   {"sku": "PHONE-001", "name": "Smart Phone", "price": 699.99, "stock": 120},
   {"sku": "TABLET-001", "name": "Air Tablet", "price": 499.99, "stock": 0}
]

Configuration:

  • Path: products

  • Key Type: Custom Key

  • Custom Key Field: sku

  • Wrap with Path: On

Output:

{
 "products": {
   "LAPTOP-001": {
     "sku": "LAPTOP-001",
     "name": "Pro Laptop",
     "price": 1299.99,
     "stock": 45
   },
   "PHONE-001": {
     "sku": "PHONE-001",
     "name": "Smart Phone",
     "price": 699.99,
     "stock": 120
   },
   "TABLET-001": {
     "sku": "TABLET-001",
     "name": "Air Tablet",
     "price": 499.99,
     "stock": 0
   }
 }
}

Example — Flat List (No Path)

Configuration:

  • Path: (empty)

  • Key Type: Push Key

  • Wrap with Path: Off

Output:

{
 "-Mabc123": {"name": "Alice", "active": true},
 "-Mdef456": {"name": "Bob", "active": false}
}

Firebase Key Restrictions

Firebase Realtime Database keys have restrictions that differ from regular JSON:

RestrictionDetails
No dots. is not allowed — used as path separator
No hash# is not allowed
No dollar sign$ is not allowed
No forward slash/ is not allowed — used as path separator
No brackets[ and ] are not allowed
No ASCII control charactersCharacters 0x00–0x1F and 0x7F
Max key length768 bytes
Max tree depth32 levels
Max node value10 MB when serialized

Firebase RTDB vs. Firestore

FeatureRealtime DatabaseFirestore
Data modelJSON treeDocuments and collections
QueryingLimited, deep filteringIndex-based, complex queries
OfflineSDK cachePersistent cache
ScalingSingle regionMulti-region
Import formatJSON (this tool)JSON (different structure)
PricingPer GB downloadedPer read/write/delete

This tool generates data for Realtime Database specifically.

Frequently Asked Questions (FAQ)

  • Does the tool upload my data to Firebase?

    No. All conversion happens locally in your browser using JavaScript. The tool only transforms the JSON format — you import the result into Firebase yourself.

  • What is a Firebase push key?

    A push key is a unique, auto-generated identifier created by Firebase (e.g., -Mabc123xyz). It is chronologically ordered, globally unique, and collision-free — making it ideal for lists in Realtime Database.

  • Should I use Push Key, Array Index, or Custom Key?

    Use Push Key for new records without a natural identifier (most cases). Use Custom Key when you have a unique natural key like email, SKU, or slug. Avoid Array Index for production data — concurrent edits cause data loss.

  • How do I import the output into Firebase?

    Use the Firebase Console (Import JSON button), Firebase CLI (firebase database:set), or the REST API (PUT or PATCH to your database URL). See the Import section above for details.

  • What characters are not allowed in Firebase keys?

    Firebase keys cannot contain ., #, $, /, [, ], or ASCII control characters.

  • What does "Wrap with Path" do?

    It wraps the output in a root node matching the Path you specified. Without it, the output is the raw keyed list without a path wrapper.

  • What does "Include Null Values" do?

    When enabled, fields with null values are kept in the output. When disabled, they are removed. Note: importing null values into Firebase deletes those fields.

  • Can I use this for Firestore?

    No. This tool generates data for Firebase Realtime Database. Firestore uses a different document/collection model.

  • Is there a file size limit?

    The tool processes data entirely in your browser. Files up to 10 MB typically convert without issues. Firebase RTDB limits individual node values to 10 MB.

  • Can I use this on mobile?

    Yes. The tool is responsive and works on smartphones and tablets.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to YAML converter. Upload .xlsx, .xls, or .xlsm files, choose block or flow style, set indent and quote preferences, then copy or download YAML.

Excel To YAML

Free online Excel to YAML converter. Upload .xlsx, .xls, or .xlsm files, choose block or flow style, set indent and quote preferences, then copy or download YAML.
Free online CSV to JSON converter. Transform CSV data into Array of Objects, 2D Arrays, Column Arrays, or Keyed Arrays with custom indent and minify options. No data leaves your browser.

CSV To JSON

Free online CSV to JSON converter. Transform CSV data into Array of Objects, 2D Arrays, Column Arrays, or Keyed Arrays with custom indent and minify options. No data leaves your browser.
Free online CSV to Excel converter. Upload CSV or TSV files, customize delimiter, sheet name, column width, and password protection, then download as .xlsx. No data leaves your browser.

CSV To Excel

Free online CSV to Excel converter. Upload CSV or TSV files, customize delimiter, sheet name, column width, and password protection, then download as .xlsx. No data leaves your browser.
Free online CSV to SQL converter. Generate INSERT and CREATE TABLE statements for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and pretty print.

CSV To SQL

Free online CSV to SQL converter. Generate INSERT and CREATE TABLE statements for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and pretty print.