Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. API Mocking Tools
  3. json-server

json-server

What it is

json-server is a free, MIT-licensed open-source package for creating a fake REST API without writing application code. It reads a db.json or db.json5 file and starts a local server at http://localhost:3000, making it suitable for testing and prototyping. Array resources expose GET, POST, PUT, PATCH, and DELETE routes; object resources expose GET, PUT, and PATCH. Query filters support comparisons, membership, case-insensitive string matching, and nested fields. Requests can sort results and paginate them with _page and _per_page, with a documented default page size of 10. The _embed parameter includes related resources, and DELETE can use _dependent for dependents. Files in ./public are served by default, with additional directories available through -s. Install it with npm; package metadata requires Node.js >=22.12.0. The displayed v1 documentation is marked beta and warns of breaking changes. It runs locally as a REST API with dynamic responses and mock data generation.

For and against

For

  • Creates a REST API without coding
  • Supports full array-resource CRUD routes
  • Provides filtering, sorting, and pagination
  • Can embed related resources
  • MIT-licensed and free to use

Against

  • Displayed v1 documentation is beta
  • Breaking changes are expected
  • Requires Node.js >=22.12.0
  • Runs as a local server

The verdict

json-server offers a straightforward local REST mock built from JSON or JSON5 data. Its routing and query features support prototyping, while the beta documentation and Node.js requirement deserve attention.

Who it suits

json-server suits developers who need local REST endpoints for frontend work, tests, or prototypes. It is useful when a JSON file and npm-based local setup are sufficient.

Plans and prices

json-server

Free

MIT-licensed open-source package · runs locally from a JSON or JSON5 file

Every plan, in full

On the record

Compatibility
The README describes the tool as a fake REST API; its repository topics include frontend, mock, REST and test.github.com · read 4 Oct 2026
Data files
It reads a db.json or db.json5 file and starts a local server at http://localhost:3000.github.com · read 4 Oct 2026
Filtering
Query filters support comparison operators, membership, case-insensitive string matching and nested fields.github.com · read 4 Oct 2026
HTTP routes
Array resources support GET, POST, PUT, PATCH and DELETE routes, while object resources support GET, PUT and PATCH.github.com · read 4 Oct 2026
Install and runtime
The package is installed with npm, and its package metadata specifies Node.js >=22.12.0.github.com · read 4 Oct 2026
License
The repository is licensed under the MIT License.github.com · read 4 Oct 2026
Purpose
json-server creates a fake REST API with zero coding for testing and prototyping.github.com · read 4 Oct 2026
Relationships
The _embed query parameter includes related resources, and DELETE supports a _dependent parameter for dependents.github.com · read 4 Oct 2026
Security and compliance
The opened project pages provide no security or compliance certification statements.github.com · read 4 Oct 2026
Sorting and pagination
Requests can sort results and paginate them with _page and _per_page; the documented default page size is 10.github.com · read 4 Oct 2026
Static files
It serves files from ./public by default and can serve additional directories passed with -s.github.com · read 4 Oct 2026
Version status
The README identifies the displayed v1 documentation as beta and warns users to expect breaking changes.github.com · read 4 Oct 2026

Alternatives to json-server

Every alternative, ranked