API Response Mocker

Pure Frontend · REST API Mock · Custom Status/Delay/Headers

Zero Dependencies · Works Offline
📋 Quick Templates
👥 Users
📦 Products
📄 Paginated
❌ Error
🔑 Auth Token
📭 Empty
⚙️ Response Config
Custom Headers
📝 Response Body (JSON)
🔒All mocking happens in your browser

What Does the API Response Mocker Do?

The API Response Mocker is a pure frontend tool for quickly generating REST API mock response data. It supports custom HTTP status codes, response delays, Content-Type, and custom headers, with built-in templates for user lists, product data, paginated responses, and error responses. Generated mock responses include the full HTTP status line, headers, and body preview, plus auto-generated cURL commands. All data is processed locally in your browser.

Core Features

How to Use

Step 1: Select a quick template or manually enter a JSON response body.

Step 2: Configure status code, delay, Content-Type, and custom headers.

Step 3: Click "Generate Mock Response" to see the full HTTP response preview and cURL command.

Step 4: Copy the cURL command or download the response for testing. Ctrl+Enter to generate quickly.

Use Cases

Frontend Development

Use mock responses when backend APIs aren't ready, accelerating frontend development and debugging.

API Testing

Simulate various HTTP status codes and error responses to test application error handling and resilience.

Performance Testing

Set response delays to simulate slow networks, testing loading states and timeout handling.

Team Collaboration

Standardize API response formats across the team with consistent mock data for frontend-backend alignment.

Extended Knowledge

REST API responses consist of three parts: status line (HTTP version + status code + reason phrase), headers (Content-Type, Cache-Control, etc.), and body (JSON/XML data). Common status codes: 2xx success, 3xx redirect, 4xx client error, 5xx server error. Mock Servers are common in development (json-server, MockJS, etc.). This tool provides a lightweight pure frontend alternative.

FAQ

Which HTTP status codes are supported?

All standard HTTP status codes including 200, 201, 400, 401, 403, 404, 500, etc. Custom codes also supported.

Can I simulate network delay?

Yes. Set 0-30 second response delay to simulate real network conditions and timeout scenarios.

Will my data be uploaded?

No. All mock data generation and preview happens in your browser. Data never leaves your device.

What response templates are available?

Built-in templates for user lists, product data, paginated responses, error responses, auth tokens, and empty data.

Can I add custom response headers?

Yes. Add Content-Type, Authorization, X-Custom-Header, and CORS-related headers.

API Response Mocker | No Signup, Client-Side · No Server Uploads

Feedback: dexshuang@google.com