JSON Server
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What JSON Server is
JSON Server is an npm package that serves a REST API from a db.json or db.json5 file. Each array in the file becomes a resource with GET, POST, PUT, PATCH and DELETE routes. Each object becomes a singular resource that supports GET, PUT and PATCH. Query parameters handle field conditions, sorting, pagination and embedding of related resources. The server starts from the command line with npx json-server db.json. By default it listens on port 3000. The README documents the v1 beta, which it notes may still bring breaking changes.
Written from the project's README, read .
- Category
- Test data and mocking
- License
- MIT
- Language
- JavaScript
- Changelog
- Releases on GitHub
Repository metrics
Status
slowLast commit 91 to 365 days before the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from JSON Server's, with its source. See also JSON Server alternatives.
Nock: Protocols: HTTP, HTTPS. source: README
Sinon.JS: Definition format: Code (JavaScript spies, stubs and mocks). source: README
mountebank: Protocols: HTTP, HTTPS, TCP, SMTP, LDAP, gRPC, WebSockets, GraphQL, SNMP, Telnet, SSH, NETCONF (built in or community extension). source: README
Faker: Definition format: Code (Python generator API via faker.Faker()); command-line faker script. source: README
Mock Service Worker: Protocols: HTTP, GraphQL, WebSocket. source: Docs: Quick start
@faker-js/faker: Definition format: Code (JavaScript API methods; mustache string templates via faker.helpers.fake). source: README
Mockito: Definition format: Code (Java API: mock(), when(), verify(); @Mock, @Spy and @InjectMocks annotations). source: Docs: Mockito site
Bogus: Definition format: Code (fluent Faker<T> API with RuleFor rules, modeled on FluentValidation syntax). source: README
Comparisons
How to install
npm install json-serverQuestions
Is JSON Server open source?
Yes. JSON Server is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is JSON Server maintained?
On 2026-09-22, the last commit to the default branch was on 2026-03-23, so the listed status is slow. Rule: Last commit 91 to 365 days before the fetch date.
How many GitHub stars does JSON Server have?
75,715 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is JSON Server written in?
The repository's primary language, as reported by the GitHub API, is JavaScript.
How do I install JSON Server?
The README gives this command: npm install json-server
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- README, read