A hosted json-server alternative
Comparison · last checked November 2026
json-server turns a db.json file into a REST API on your laptop in one command, and it is free and open source. Relmock does the same job on a server: your mock gets a URL that teammates, testers, phones and deployed previews can reach, and it behaves like a database.
When json-server is the right tool
- Only you use the mock, on your own machine.
- You want the data in a file in your repo, under version control.
- You do not want an account or any monthly limit.
When a hosted mock helps
- A designer, tester or client needs to click through the app on their own device.
- A preview deploy (Vercel, Netlify) or a phone app on real hardware needs a public URL, not
localhost:3000. - You want bad writes to fail the way your real backend will: unknown foreign keys, missing required fields, values out of range.
Side by side
| Feature | json-server | Relmock |
|---|---|---|
| Where it runs | Your machine (or a server you set up) | Hosted; one HTTPS URL per project |
| Data | A JSON file | A database, per project |
| Relations | By naming convention (postId), with _embed | Declared foreign keys; a bad key answers 422 |
| Deleting a parent | _dependent to delete children | Delete rules per relation: block, cascade or clear the link |
| Field validation | No | Types, required, min/max, length, regex, enums |
| Generated data | You write it | Realistic data generated from your schema |
| Errors, latency, offline | No | Network modes, added latency, forced status codes |
| Request log | In your terminal | Every call saved, with replay and cURL |
| Account and limits | None | Free account, monthly call limit |
Bring your db.json
In a new project, choose Import and drop your db.json. Each top-level key becomes a table, column types are worked out from the values, and userId or user_id columns are linked to the users table when it is in the file. Nested objects with an id become their own linked tables. You get a preview before anything is created (import guide).
The query parameters you already use carry over: field filters, _sort and _order, _page and _limit, _start and _end, and the _ne, _gte, _lte and _like operators in the json-server 0.17 style (full list).
GET /posts?userId=3&_sort=id&_order=desc&_page=1&_limit=10
POST /comments { "postId": 999, "body": "hi" }
422 postId=999 does not match any record in 'posts'.
Relmock's free plan has no time limit and needs no card: 3 projects, 20 tables per project, 200 records per table and 2,000 mock calls a month (all limits). It is REST only; there is no GraphQL endpoint.
json-server details from its README. Other comparisons: JSONPlaceholder, mockapi.io.