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-server
Fun API Playground
What it is
An npm package that serves a JSON file as REST
A hosted and in-browser simulated API catalog
Data model
Yours, from db.json
55 fixed domains
Auth and roles
None built in
Bearer roles, signed JWTs, OAuth 2.0 flows
Validation errors
None built in
400 and 422 with field-level messages
Concurrency
Not modelled
ETag / If-Match with a real 412
Rate limiting
None
Real 429 with Retry-After
Runs in CI with no network
Yes
Yes, through the browser engine; the HTTP API needs the network
Setup
npm install and a JSON file
None
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
Your own data model, defined in a file you control and can commit next to the front-end.
Runs locally, so it works in CI with no external dependency at all.
Writes go straight to db.json, so the state after a test run is easy to inspect.
Customisable with Express middleware when you need one specific behaviour.
What this playground does better
Auth, roles, validation, concurrency and rate limits exist without writing middleware.
Failures happen for domain reasons, so a test exercises how the client copes rather than what you scripted.
Nothing to install or keep running, and the engine also runs offline in the browser.
Interactive docs, OpenAPI 3.1 and Postman exports for every API.
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.
Official sources and scope
This compares a training playground with the documented use case of the other tool. Plans, limits and hosted features can change. For current terms, use the official sources below.
JSONPlaceholder — JSONPlaceholder fakes its writes. If you need a POST that a later GET can find, that is the difference.
httpbin — httpbin shows you the request. This shows you an API. They answer different questions.
ReqRes — Choose between a hosted test backend with account-backed collections and a no-signup training playground with themed scenarios.
WireMock — WireMock reproduces the API you already know, exactly. This one gives you an API you do not control.
Mockoon — Mockoon is for designing your own mock API. This one is an API already designed, with rules you have to discover.
Beeceptor — Beeceptor gives you a hosted endpoint to inspect and mock. This gives you finished APIs that behave like real ones.
DummyJSON — DummyJSON has rich sample data and a JWT login. Its writes are simulated; here they persist.
Postman mock servers — A Postman mock server replays the examples saved in a collection. This one runs an API with state and rules.
PokeAPI — PokeAPI is the real Pokémon database, read-only. This Pokémon API is invented data you can write to and break.
SWAPI — SWAPI serves Star Wars data, read-only. This Star Wars API is invented practice data you can change.
Restful Booker — Restful Booker is one booking API built for testing practice. This is 55 APIs with the failure paths built in.
Swagger Petstore — Petstore is the reference sample for an OpenAPI document. This is a set of APIs whose behaviour is the thing you test.
GoRest — GoRest needs a token from a social login before you can write. This needs no account at all.
FakeStoreAPI — FakeStoreAPI returns a fake id for your POST and saves nothing. Here the cart, coupon and checkout keep their state.
Practice Software Testing — Toolshop is a full web shop with seeded bugs for UI and API testing. Fun API is many small APIs built around HTTP behaviour.
balldontlie — balldontlie serves real league data behind an API key and a free tier of a few requests a minute. This serves invented leagues you can drive yourself.
the HAPI FHIR public test server — The HAPI public server is a full FHIR implementation shared by everyone and purged regularly. This is a small, isolated, synthetic subset for practising tests.
the National Weather Service API — api.weather.gov is real, free US government weather data. This is a deterministic weather API for tests that need the same forecast every time.
local LLM mock servers — mockllm, llmock and similar packages run a fake OpenAI/Anthropic server on your machine. This is the same idea, hosted, with failure scenarios chosen by model name.
the free mock API landscape — Six free options, what each is genuinely for, and how to tell which one your problem needs.