REST API Builder Playground — Build, Test & Export Mock API Routes Visually
What's included
Features
About this tool
REST API Builder Playground — Design Routes Visually, Test Requests Instantly, Export Express.js Code
REST APIs are the backbone of modern web development. Every frontend app — whether built with React, Vue, or plain JavaScript — needs an API to fetch data, submit forms, authenticate users, and manage resources. But building a backend API from scratch takes time, and using a real backend for frontend prototyping means waiting for it to be ready, dealing with CORS issues, and managing server state during development. The REST API Builder solves all of this.
This tool lets you create a complete collection of mock API routes using a visual interface — no code required. Define each route's HTTP method, URL path, response status code, JSON response body, headers, auth requirements, and simulated delay. Then test every route using the built-in HTTP client. When your API design is finalized, export working Express.js code with a single click.
How routes work: Each route is a combination of an HTTP method and a URL path. GET /users returns a list of users. POST /users creates one. GET /users/:id retrieves a specific user by their ID — the :id portion is a route parameter that matches any value, so /users/1, /users/42, and /users/alice all match. You can define as many routes as your API needs, with full control over what each one returns.
The built-in HTTP client lets you test your routes without leaving the tool. Select the method, type the path (replacing :id with a real value like 1), add an Authorization token if the route requires authentication, and click Send. The tool matches your request against all defined routes, applies the auth check if needed, simulates the configured delay, and returns the mock response — with a color-coded status badge, response timing, matched route indicator, response headers, and syntax-highlighted JSON body.
Auth simulation is built in. Mark any route as auth-required, and the HTTP client will return a 401 Unauthorized response if you try to test it without providing an Authorization token. This lets you design and test protected endpoints — login flows, profile endpoints, admin-only routes — exactly as they would behave in a real API.
CRUD templates give you a complete starting API in one click. Load Users CRUD for a five-route user management API, Posts CRUD for a blog-style API, Products CRUD for e-commerce, Blog API for a full content platform with categories and tags, or Auth API for a complete authentication system with login, register, logout, profile, and token refresh endpoints.
Export to Express.js generates production-ready server code. The output includes all your routes with proper middleware, a requireAuth function for protected routes, response delay handling, and an app.listen() call. Save the file, run npm install express && node server.js, and your mock API becomes a real running server — ready to swap in for production code.
All data is saved automatically to your browser's localStorage. Return to the tool anytime and your routes are exactly where you left them. No account, no sign-up, no data ever leaves your browser.
Step by step
How to Use
- 1Start with a template or add your first routeClick "Load Template" to instantly load a complete CRUD API — choose from Users, Posts, Products, Blog API, or Auth API. Or click "+ Add Route" to start from scratch with a blank GET route. The sidebar shows all your routes with method badges, paths, and status codes at a glance.
- 2Configure the route in the editorClick any route in the sidebar to open it in the editor. Select the HTTP method (GET, POST, PUT, PATCH, DELETE) using the colored pill buttons. Type the path — use :id or :slug for route parameters that match any value. Set the status code using the number input or click a quick-select chip (200, 201, 400, 401, 404, 422, 500). Paste or type your mock JSON response in the Response Body textarea and click Format JSON to clean it up.
- 3Set auth and delay optionsToggle "Auth Required" if this route should reject requests without an Authorization header. Drag the Delay slider to add a simulated response delay of up to 2000ms — useful for testing loading spinners and async UI states. Click Save Route to commit your changes.
- 4Test routes with the HTTP ClientSwitch to the HTTP Client tab. The method and path auto-fill from your selected route. Replace any :id parameters with real values like /users/1. Add an Authorization token if testing a protected route. Click Send — the response panel shows the status code, timing, matched route, response headers, and syntax-highlighted JSON body. A "no matching route" warning appears if your request path does not match any route.
- 5Export your Express.js server codeSwitch to the Export Code tab. Choose Express.js to see the complete, runnable server code with all your routes, auth middleware, and delays configured. Click Copy All Code and paste it into a server.js file. Run npm install express && node server.js to turn your mock API into a real running Express server. Or choose JSON Config to download your route configuration as a backup.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
No. Everything runs in your browser. Create and test mock routes without any Node.js or server setup. The HTTP client simulates requests in-browser and matches them against your defined routes. Export the Express.js code when you want a real running server.
Any REST API structure — user management, blog APIs, e-commerce products, authentication flows, and more. Use the five CRUD templates (Users, Posts, Products, Blog API, Auth API) as starting points, or build from scratch with full control over methods, paths, status codes, and response bodies.
Use the HTTP Client tab. Select the method, type the path (replacing :id with a real value), add an auth token if needed, and click Send. The response panel shows the status code, timing, matched route, headers, and JSON body. Color-coded: 2xx green, 4xx orange, 5xx red.
:id is a wildcard segment that matches any value in that URL position. /users/:id matches /users/1, /users/42, or /users/alice. The same :param syntax as Express.js. Replace :id with a real value when testing in the HTTP client.
Yes. Export Code generates complete Express.js server code for all your routes, including auth middleware and delay handling. Copy it, paste into server.js, run npm install express && node server.js. You also get a JSON Config export for backup and import.
Pre-built route sets covering Create, Read, Update, and Delete operations. Five templates: Users CRUD (5 routes), Posts CRUD (5 routes), Products CRUD (5 routes), Blog API (posts, categories, tags), and Auth API (login, register, logout, profile, token refresh). Loading a template replaces your current routes after confirmation.
Yes. Routes are auto-saved to localStorage every time you make a change. Return anytime and find your routes exactly as you left them. No account required. Your data never leaves your browser.
The REST API Builder Playground is a visual utility for prototyping and building API structures without writing code. The Express.js Playground is a lesson-based learning environment with 32 guided lessons for learning Express.js by writing code. Use this playground to prototype; use the Express.js Playground to learn.