Compare
MockBase vs json-server
json-server is the fastest possible way to get fake CRUD data locally — MockBase is the fastest way to get a URL other people and machines can reach.
json-server is a free, open-source npm package: point it at a single JSON file and it serves a full fake REST API — with real GET/POST/PUT/PATCH/DELETE routes generated automatically from that file's structure — in well under a minute, with zero configuration.
| Feature | MockBase | json-server |
|---|---|---|
| Hosted endpoint, nothing to install | Live HTTPS endpoint in one click | Local by default; hosting is on you |
| Usable without creating an account | 3 mocks, 10 routes, 2,000 requests/month, no account needed | No account, ever |
| Conditional matching (header, query, body) | 5 operators, priority ordering, path params | Serves the JSON file's data plus basic CRUD only |
| Dynamic response templating | Sandboxed Jinja2 — request data, UUIDs, timestamps | No response templating |
| Automatic stateful CRUD | One toggle — full GET/POST/PUT/PATCH/DELETE lifecycle | Real CRUD, persisted to the JSON file on disk |
| Random failure injection | Weighted scenarios: status, latency, truncated or empty bodies, or a real connection reset | No latency or failure simulation |
| OpenAPI import & export | Import by paste, file or URL; export with inferred $ref schemas | No spec import |
| Record & replay a real API | Proxies unmatched requests, captures them as routes | No proxy/capture feature |
| Live, remote request inspector | WebSocket stream: method, path, headers, body, latency, IP | No built-in request inspector |
| GraphQL operation-name matching | Matches operationName, or the name parsed out of the query text | REST over a JSON file, by design |
| SOAP/XML matching and responses | Reads envelope elements by name; raw XML responses, templating included | JSON only, by design |
| Binary file responses | Upload a file, served with its real Content-Type (300 KB cap) | Serves JSON from a file |
| Version history with rollback | Snapshot before every save, 30 versions, restore is itself undoable | Your JSON file in git is the history |
| Deterministic rate limit simulation | N requests per window, per route, with Retry-After | No throttling of any kind, by design |
| Outbound callouts (webhooks) | Fires a templated webhook after responding, with a delay | No outbound requests, by design |
| API, CLI, or MCP server for managing mocks | Personal API key drives a dependency-free CLI (push/pull a JSON config) and a local MCP server (8 tools). Newer and smaller than most of the field below — see the honest comparison in the notes for each competitor. | The entire tool is a CLI over a JSON file -- it's mock-as-code by construction, with no API, account, or MCP server needed to make it so |
What json-server is good at
- Genuinely the fastest path from "nothing" to a working fake REST API with real CRUD behavior, for local use
- Completely free, no account, no cloud dependency of any kind
- Writes actually persist back to the JSON file on disk while the server runs, which is a simple, real form of statefulness
Where it differs from MockBase
- It's local by default — reachable only from the machine running it, unless you separately set up and maintain your own tunnel or hosting. A hosted variant ("my-json-server") exists but serves a fixed, public GitHub-backed file with real limits, not a private, writable, shareable mock.
- There's no conditional matching on headers or query params, no response templating, and no chaos/latency injection — it serves the file's data plus basic CRUD, and that's the whole feature set by design.
- No live request inspector, no OpenAPI import, no way to simulate a specific error rate or a slow, flaky endpoint.
Pricing
Free and open-source, always. Running it costs nothing beyond your own machine or hosting, if you choose to deploy it somewhere yourself.
Choose MockBase if
- You need the mock reachable by a teammate, a mobile device, or CI — not just your own terminal
- You need conditional responses, chaos injection, templating, or a live inspector
- You want OpenAPI import instead of hand-shaping a JSON file into the right structure
Choose json-server if
- You're prototyping entirely on one machine and a shareable URL was never needed
- A plain JSON file's worth of fake CRUD data is genuinely all the scenario requires
Pricing, limits, and features for json-server were checked against its own pricing and documentation pages at the time of writing and may have changed since — see its current pricing page for the latest numbers. A feature marked as missing means it isn't documented, not that we tested it and it failed. MockBase is an independent tool and is not affiliated with, endorsed by, or sponsored by json-server. Spot something out of date? Tell us and we'll correct it.