A json-server alternative with behaviour, not just CRUD

json-server is an npm package that turns a db.json file into a full REST API with one command: every top-level key becomes a collection with GET, POST, PUT, PATCH and DELETE, writes are saved back to the file, and filtering, sorting and pagination come from query parameters. For a front-end that needs a working backend on day one, very little is faster.

At a glance

json-server compared with this playground, checked 2026-09.
 json-serverFun API Playground
What it isAn npm package that serves a JSON file as RESTA hosted and in-browser simulated API catalog
Data modelYours, from db.json39 fixed domains
Auth and rolesNone built inBearer roles, signed JWTs, OAuth 2.0 flows
Validation errorsNone built in400 and 422 with field-level messages
ConcurrencyNot modelledETag / If-Match with a real 412
Rate limitingNoneReal 429 with Retry-After
Runs in CI with no networkYesYes, through the browser engine; the HTTP API needs the network
Setupnpm install and a JSON fileNone

Where it stops

It is a CRUD mirror of your file. It has no authentication, no roles, no validation beyond what the file shape implies, no concurrency control, no rate limits and no business rules, so it answers almost everything with 200 or 201. That makes it a stand-in for a database, not for an API somebody else designed — your client never meets a 409, a 412, a 422 or a 429 unless you write middleware to produce one.

What is different here

Here the rules come built in and were written by somebody other than you: tickets sell out with a 409, stale versions are refused with 412, validation fails with 422, rate limits answer 429 with Retry-After, tokens expire. Nothing has to be installed or run, the same behaviour is available in the browser and over HTTPS, and each API ships an OpenAPI 3.1 document and a Postman collection.

What json-server does better

What this playground does better

Which to use

Use json-server when you need your own data model behind a working REST API in minutes. Use this when the point is to see how a client copes with an API that has rules of its own.

Checked against json-server as of 2026-09.

Other comparisons

All 39 mock REST APIs · Getting started guide · About this playground

Last updated