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.
API Mock Server & Data Generator
🟢 Free Sandbox
Design robust REST/GraphQL mocks, dynamic payloads, and test complex edge cases.
Endpoints (2)
GET/api/v1/users/:id
200•150ms
POST/api/v1/trades/derivatives
201•300ms• 1 Rules
Route Core
Security & Reliability
Default JSON Payload
Dyn: {{uuid}}, {{path.id}}, {{query.q}}
Enterprise-Grade API Mocking, Locally in Your Browser
ToolLok’s completely free API Sandbox & Synthetic Data Generator eliminates frontend blockages. Establish robust data models for business platforms, test dynamic REST edge cases, enforce strict authorization policies, and export comprehensive OpenAPI specs—all processed securely within your device without relying on external backends.
Intelligent Conditional Routing
Establish complex logical rules (e.g., ?status=error) to instantly override default mocked responses. Perfect for validating your application's error-handling flows.
Dynamic Response Interpolation
Inject intelligent tokens like {{path.id}}, {{uuid}}, or {{company}} into your JSON templates to produce deterministic, hyper-realistic synthetic mock data.
Frequently Asked Questions
Does this support OpenAPI (Swagger) imports?
Yes. Simply click "Import OpenAPI" and select an OpenAPI 3.x JSON or YAML specification file. The engine will intelligently parse paths, parameters, schemas, and examples to instantly stand up your mock environment.
Is my proprietary data sent to external servers?
Absolutely not. This is a secure, client-side sandbox. All routing rules, synthetic generation algorithms, and payload interpolations execute precisely within your local browser runtime.