← All guides

A Firebase Emulator alternative for when you just need a backend URL

Credit where due: the Firebase Local Emulator Suite is the right tool for testing a real Firebase app. It emulates Firestore, Realtime Database, Auth, Cloud Functions, Storage, Pub/Sub and Hosting on your machine, runs your actual security rules (with a rules unit-testing harness nothing else offers), has a genuinely nice Emulator UI, supports export/import for fixtures, works offline, is free, and is maintained by Google. If your production backend is Firebase, use the emulator β€” full stop; nothing on this page replaces rules testing or Functions triggers, and we don't pretend to.

This page is about a different job Firebase keeps getting drafted into: "I need a quick backend for my frontend demo / prototype / tutorial." You don't want Firebase, exactly β€” you want some JSON with CRUD and a URL. Reaching for Firestore for that job means adopting the SDK, the document data model, and the emulator toolchain for none of the Firebase payoff. Here's what that costs, each item verified hands-on.

The toll booth (each item verified on firebase-tools v15.28.1, August 2026)

We installed the current firebase-tools and ran firebase emulators:start --only firestore --project demo-test on a clean Linux box, then drove the emulator over its REST surface. Every claim below is the actual observed behavior.

Toll 1: the toolchain is ~385MB and now requires JDK 21+. npm i firebase-tools put 248MB in node_modules; first start downloaded another 137MB Firestore emulator JAR (cloud-firestore-emulator-v1.22.0.jar). And on a box with Java 17 β€” the LTS a huge share of dev machines and CI images still carry β€” the emulator refuses to boot: "Error: firebase-tools no longer supports Java version before 21. Please install a JDK at version 21 or above." We had to install OpenJDK 21 before --only firestore would start at all. For comparison, the hosted-mock version of "a backend for my demo" is one curl and zero installs.

Toll 2: the REST surface doesn't speak plain JSON. POSTing {"name":"Hammer","price":5} to a Firestore collection returns 400 {"error":{"code":400,"message":"Payload isn't valid for request.","status":"INVALID_ARGUMENT"}}. Firestore's REST API requires the typed-value envelope: {"fields":{"name":{"stringValue":"Anvil"},"price":{"doubleValue":19.99}}} β€” every field, every request, both directions. Fine when an SDK writes it for you; miserable from curl, Postman, or a quick fetch.

Toll 3: query params are silently ignored β€” filtering is a POST. With two documents in different categories, GET …/products?category=tools returned both. To actually filter you POST a structuredQuery JSON document to …/documents:runQuery (we did; it works) β€” there is no ?category=, no ?page=, no ?sortBy= on the list endpoint. Your "quick prototype" now contains a query-builder.

Toll 4: a restart wipes everything. We created documents, stopped the emulator, started it again: GET …/products β†’ {}. Empty. That's by design β€” data is in-memory unless you remember --export-on-exit and --import on every invocation and check the export directory into your repo.

Toll 5: it's local by definition. It's the Local Emulator Suite β€” the moment a teammate, your phone, a CI job, or a deployed preview build needs to hit the backend, localhost doesn't travel. (And pointing prototypes at a real Firebase project instead means a Google account, a project, security rules in test mode with the scary expiry warning, and quota anxiety.)

The 60-second switch

If the job was never really "Firebase" but "a backend for the frontend to talk to", create a hosted project β€” nothing to install, no Java, no SDK:

curl -X POST https://mockbird.mockbird.workers.dev/api/projects \
  -H 'content-type: application/json' -d '{"name":"my-api","preset":"ecommerce"}'
# β†’ {"id":"<PID>","adminKey":"…","baseUrl":"https://mockbird.mockbird.workers.dev/m/<PID>",…}
# 4 resources, realistic seeded records, live immediately β€” from any device

Plain JSON in, plain JSON out, and the query toolkit is just there (ran against the shared demo before publishing):

# a write is plain JSON β€” no typed-value envelope:
curl -X POST https://mockbird.mockbird.workers.dev/m/demo/products \
  -H 'content-type: application/json' -d '{"name":"firebase-guide-check","price":9.99}'
# β†’ {"name":"firebase-guide-check","price":9.99,"id":31}   …and GET /products/31 returns it back

# filtering is a query param, not a structuredQuery POST:
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?category=books'

# pagination + sorting, same story:
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?page=2&limit=3&sortBy=price&order=desc'

And the data persists β€” close the laptop, come back tomorrow, the records are still there. Want deliberate resets instead of accidental ones? Snapshots save and restore whole data states on demand β€” the ergonomic version of --export-on-exit.

Firestore concepts β†’ Mockbird

Firebase / FirestoreMockbirdNotes
firebase emulators:start (Node + JDK 21 + 385MB)POST /api/projectshosted URL instead of localhost; nothing to install
collectionresourcedefine fields once, get seeded realistic records
document w/ typed-value fieldsplain JSON record{"name":"Anvil","price":19.99} β€” no stringValue/doubleValue wrapping
auto-ID (0EU8ypgsY5…)numeric idpredictable URLs: /products/31
:runQuery + structuredQueryquery params?category=books&price_gte=10&sortBy=price&order=desc&page=2&limit=3&q=term
subcollectionsnested routes + _expand/_embed/products/1/reviews, joins via <name>Id
Firebase Auth emulatormock authany email/password β†’ real signed JWT; protected mode 401s without it
security rulesno equivalenthonest: rules testing is the emulator's crown jewel β€” keep it for real Firebase apps
--export-on-exit / --importsnapshotssave/restore named data states via API; pin one per request w/ X-Mockbird-Snapshot
Emulator UIdashboard data browserbrowse/edit records, request inspector w/ headers+bodies
Cloud Functions triggerswebhookssigned POST on record created/updated/deleted β€” the common "onCreate" cases
offline slow-network simulation (DIY)?mock_delay/?mock_chaos/?mock_seqlatency, random failures, fail-then-recover β€” per request, free

Try it in 10 seconds (shared demo, no setup)

# plain-JSON reads with a real query toolkit:
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?category=books'
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?page=2&limit=3&sortBy=price&order=desc'

# loading-state and failure drills for the frontend:
curl 'https://mockbird.mockbird.workers.dev/m/demo/products/1?mock_delay=2000'
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?mock_chaos=0.5'

Use both β€” the split is clean

Building on Firebase? Use the emulator. Rules tests, Functions triggers, Auth flows, offline development β€” it's official, deep, and free. Building a frontend that just needs a backend to exist? Skip the SDK, the JDK, and the typed-value JSON: a hosted mock gives you plain-JSON CRUD, filtering, auth simulation, and a URL anyone can hit β€” then swap the base URL when the real backend ships.

Honest comparison

Firebase Local Emulator SuiteReal Firebase project (Spark free)Mockbird
Pricefreefree tier (quotas)free while in beta
InstallNode + firebase-tools (248MB) + JDK 21+ + 137MB JARnone (SDK in app)none β€” one curl
Shareable URLno β€” localhostyesyes β€” 10,000 req/project/day, no signup
Plain-JSON REST CRUDno β€” typed-value envelope, structuredQuerysame REST surfaceyes β€” plain JSON both ways
Filter/sort/page via query paramsno (verified ignored)noyes, every resource
Data survives restartonly with --export-on-exit/--importyesyes (snapshots for deliberate resets)
Security-rules testingexcellent β€” unmatchedproduction rulesnone
Functions/triggers emulationyesdeployedwebhooks on record changes only
Realtime listeners (onSnapshot)yes β€” full SDK semanticsyesno β€” REST/GraphQL polling
Works offlineyesnono
Latency/failure injectionDIYno?mock_delay/?mock_chaos/?mock_seq β€” free

Written by the Mockbird maker β€” bias disclosed. Where the Firebase emulator genuinely wins: it emulates actual Firebase β€” security-rules unit testing, Auth flows, Cloud Functions triggers, realtime onSnapshot listeners, Storage, Pub/Sub, the Emulator UI, offline use, no request caps. If Firebase is (or will be) your production backend, there is no substitute and this page isn't for you. Every behavioral claim above was verified by us on August 26, 2026 against firebase-tools v15.28.1 / Firestore emulator v1.22.0 on Linux: install sizes from du/ls, the JDK-21 refusal with OpenJDK 17 installed, the typed-value 400, the ignored ?category= filter with two differing documents, the working :runQuery equivalent, and the empty {} after restart. If any of this changes, we'll update the page.

Full API reference in the docs. More guides: json-server, hosted Β· mock JWT auth Β· mock from OpenAPI Β· deterministic test data Β· free mock API tools compared. Create your API β†’