API Mock Server & Synthetic Data Generator
How to use API Mock Server & Synthetic Data Generator
- 1Configure Your Endpoint: Start by clicking Add Route. Select your HTTP method (GET, POST, etc.) and define the route path (e.g., /api/users/:id). Set the desired HTTP status code, authentication requirement, and simulated network latency to mimic real-world network conditions.
- 2Design the Synthetic Payload: Inject dynamic data.In the Config & Response tab, write your default JSON response. Use dynamic double-brace variables like {{uuid}}, {{name}}, or {{path.id}} to ensure the mock server generates fresh, realistic synthetic data on every single request.
- 3Set Up Conditional Rules: Simulate edge cases.Switch to the Rules tab to build logic without writing code. Create IF/THEN scenarios—such as forcing a 500 Server Error if the query parameter ?error=true is present, or returning 404 Not Found if a specific path parameter is used.
- 4Test in the Live Sandbox: Verify your routing logic.Go to the Live Sandbox tab to act as the client. Enter your configured URL, add any necessary headers or JSON body payloads, and click Send Request. The response pipeline will show you the exact status code, simulated latency, and dynamically generated JSON.
- 5Export to Your Codebase: Once the endpoint behaves perfectly, open the Code Export tab. Instantly copy ready-to-use code snippets for Express.js, MSW (Mock Service Worker), JS Fetch, or cURL to drop directly into your frontend development workflow.
About API Mock Server & Synthetic Data Generator
Design mock REST endpoints, generate sample JSON data, simulate latency and errors, and export Express.js server code for local API testing.
This tool runs in your browser. Anything you enter is processed on your device. See our Privacy Policy.
More Developer Tools
View all- CSS Micro-Interaction & Animation BuilderVisual UI editor for generating pure CSS animations, progress bars, and geometric morphing effects.
- JSON Toolkit – Formatter, Validator, Beautifier & ConverterFree online JSON Toolkit to format, validate, beautify, minify, repair, analyze, transform, and convert JSON into TypeScript, JSON Schema, CSV, YAML, and JavaScript.
- QR Code, Barcode & Multi-Format GeneratorGenerate custom QR codes and professional barcodes for websites, Wi-Fi, contacts, products, events, and payments. Customize, preview, and download individual or bulk codes.
- Text Difference CheckerCompare two text files or text versions online. Highlight added, removed, and unchanged lines, ignore whitespace, and export differences for free.