Get a full fake REST API with zero coding in less than 30 seconds by serving JSON files.
JSON Server is a development tool that creates a fake REST API from a JSON file. It allows frontend and mobile developers to simulate a backend server for prototyping, testing, and demoing applications without writing any server-side code. It provides realistic endpoints with full CRUD operations, relationships, and query capabilities.
Frontend developers, mobile developers, and QA engineers who need a quick, realistic backend for prototyping, testing UI components, or creating demos without a live server.
Developers choose JSON Server for its incredible speed and simplicity—it creates a working API in under 30 seconds. It offers a more realistic and full-featured alternative to hard-coded mock data, with support for relationships, queries, and static file serving.
Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Runs with a single command like `npx json-server db.json`, creating full CRUD endpoints without writing any server code, as shown in the README's usage example.
Supports advanced filtering, sorting, pagination, and complex queries through URL parameters, such as `?views:gt=100` and `_where` for JSON-based conditions, detailed in the query params section.
Handles relational data with embedding using `_embed`, allowing for nested resources like including comments with posts, demonstrated in the routes and query examples.
Can serve static files from a public directory, making it easy to host frontend assets alongside the mock API, as mentioned in the static files section.
The v1 documentation is labeled as beta with breaking changes, and the stable version is v0.17.4, indicating potential migration issues and instability for new users.
Lacks authentication and authorization features, which limits its use for testing secured endpoints in realistic scenarios, as it's designed purely for mocking.
Data is stored in memory and changes are lost on server restart, requiring manual saving of the JSON file for persistence, a noted limitation for long-term testing.