Fake REST API Generator
Create a complete mock REST API — define endpoints, methods, and response fields, then export as json-server, Express, or Postman
- Home
- /
- Fake REST API Generator
Endpoints
Options
Quick Examples
Generated Output
{
"users": [
{ "id": 1, "name": "..." }
]
}
Endpoints
0
Format
db.json
Resources
0
Size
0 B
What Is a Fake REST API?
A fake REST API is a mock server that simulates real API endpoints during development. Instead of waiting for a backend to be built, front-end developers can use fake APIs to build and test UI components, handle data fetching, and validate application logic.
This generator creates a complete mock API setup in three formats: json-server (zero-config REST API), Express.js server (customizable Node.js server), or Postman collection (import into Postman for testing).
How to Use This Generator
- Set API details — Enter a title, version, and base URL for your API.
- Add endpoints — Define routes with HTTP method, path, and response fields (name + type).
- Select output format — Choose json-server, Express server, or Postman collection.
- Copy or download — Click Copy to copy the output, or Download to save the file.
- Run your mock API — Use
npx json-server db.jsonornode server.jsto start your fake API.
Output Formats
json-server (db.json)
A single JSON file compatible with json-server. Run with npx json-server db.json to get a full REST API with zero configuration. Supports GET, POST, PUT, PATCH, DELETE, filtering, sorting, and pagination.
Express Server (server.js)
A complete Node.js Express server with all routes defined. Run with node server.js after installing express and cors (npm install express cors). Includes CORS support, delay simulation, and request logging.
Postman Collection
A Postman collection v2.1 JSON file. Import into Postman to get all endpoints organized in a collection with methods, URLs, and example responses ready to test.
FAQs
Is my data sent to a server?
No. All processing is performed locally in your browser. Your data never leaves your device.
What is json-server?
json-server is a popular npm package that creates a full REST API from a JSON file in seconds. It supports all CRUD operations, filtering, sorting, and pagination out of the box.
Can I customize the generated Express server?
Yes. The generated Express server is a complete, readable JavaScript file that you can edit to add custom logic, authentication, validation, or any other middleware.
Is this tool free to use?
Yes. This tool is completely free with no usage limits or registration required.