Mockoon — Free Desktop Mock Server
Mockoon is a free, open-source desktop application for creating local mock HTTP servers in seconds — no code required. Define your API routes visually, generate realistic fake data with Handlebars and Faker.js templates, and start a real localhost server your frontend or tests can call immediately.
What is Mockoon?
Mockoon was created by Guillaume Monnet and released as open source under the MIT license. It runs as a native desktop application on macOS, Windows, and Linux, providing a visual interface for defining mock API routes and their responses. Each mock server configuration is saved as a JSON file that can be committed to Git and shared with your team.
The core use case is decoupling frontend development from backend readiness. When your team agrees on an API contract (routes, request/response shapes), a developer can define those routes in Mockoon, run them locally, and the frontend team can integrate immediately — no waiting for the backend to be implemented. Mockoon also makes it easy to mock third-party dependencies (payment APIs, email services, weather data) without making real requests during development.
Key Features
- Visual UI — drag-and-drop route creation with no configuration files to write manually
- Multiple environments — run several independent mock servers simultaneously on different ports
- Response templates — Handlebars helpers and Faker.js integration for dynamic, realistic fake data
- Response rules — serve different responses based on headers, body, query params, or route params
- Data buckets — in-memory stores that simulate stateful CRUD behavior across requests
- Mockoon CLI — headless server for CI/CD pipelines, supports Docker
- HTTPS — auto-generated or custom TLS certificates for mock servers
- Proxy mode — forward unmatched requests to a real API and record responses
- OpenAPI import — generate mock routes automatically from an OpenAPI 3.x spec
- Latency simulation — add artificial delays to simulate slow networks or rate limits
Installation
Desktop App (macOS / Windows / Linux)
Download from mockoon.com/download
macOS (Homebrew)
brew install --cask mockoon
Mockoon CLI
# Install Mockoon CLI globally npm install -g @mockoon/cli # Start a mock server from a Mockoon environment file mockoon-cli start --data ./my-api.json --port 3001 # Run with Docker docker run -v /path/to/data:/data \ mockoon/cli:latest \ --data /data/my-api.json --port 3001 # Start multiple environments simultaneously mockoon-cli start --data ./api1.json --port 3001 mockoon-cli start --data ./api2.json --port 3002
Response Templating with Faker.js
// Mockoon response body with Handlebars templating
{
"id": "{{faker 'number.int' min=1 max=9999}}",
"name": "{{faker 'person.fullName'}}",
"email": "{{faker 'internet.email'}}",
"createdAt": "{{now 'YYYY-MM-DDTHH:mm:ssZ'}}",
"status": "{{oneOf (array 'active' 'inactive' 'pending')}}"
}
Mockoon uses Handlebars syntax extended with Faker.js helpers. faker 'person.fullName' generates a random name; oneOf picks a random value from an array; now inserts the current timestamp. Each request gets a freshly generated response.
Mockoon vs WireMock vs MSW
| Feature | Mockoon | WireMock | MSW (Mock Service Worker) |
|---|---|---|---|
| Interface | Desktop GUI | Config files / Java API | JavaScript code |
| Language required | None (visual) | Java / JSON | JavaScript / TypeScript |
| Runs as | Real HTTP server | Real HTTP server | Service Worker (browser) |
| Best for | Frontend teams, quick setup | Java integration tests | React / frontend unit tests |
| CI/CD CLI | Yes (mockoon-cli) | Yes (JAR or Docker) | Yes (Node.js server mode) |
| Stateful mocking | Yes (data buckets) | Via stateful scenarios | Via custom handlers |
Use Cases
- Frontend development against an agreed API contract before backend is ready
- Mocking third-party APIs (Stripe, SendGrid, Twilio) to avoid real API calls in development
- Integration testing in CI/CD with mockoon-cli running as a Docker container
- Simulating error conditions (500, 503, slow responses) to test error handling
- Prototyping and demoing mobile apps without a real backend
- Rapid API prototyping to validate an API design before implementation
Frequently Asked Questions
What is Mockoon and what problem does it solve?▼
Mockoon is a free desktop application that lets you create local mock HTTP servers in seconds. The problem it solves is frontend-backend coupling: when a frontend team is building a feature but the backend API is not yet implemented, development blocks. Mockoon lets you define the API contract (routes, response shapes, status codes) and run a real local HTTP server immediately — so frontend development and API testing can proceed without waiting for the real backend. It also helps with third-party API dependencies: if you depend on a paid or rate-limited external API, you can mock it locally.
How does Mockoon compare to WireMock?▼
WireMock is a Java-based mock server typically used in backend integration testing, configured via JSON stub files or Java code. It is powerful for complex scenarios but requires Java, has steeper configuration, and is more complex to set up for quick frontend development. Mockoon is a desktop GUI application with a visual drag-and-drop interface — no code required to define routes. It also has a CLI (mockoon-cli) for CI/CD use. Mockoon is better suited for frontend developers who want a quick visual tool; WireMock is better for Java backend teams doing programmatic test automation.
How do I use Mockoon CLI in CI/CD?▼
Install the CLI with npm install -g @mockoon/cli. Export your environment from the Mockoon Desktop app as a JSON file and commit it to your repository. In your CI pipeline, run mockoon-cli start --data my-api.json --port 3001 before your tests. The process stays running so your tests can make real HTTP requests to localhost:3001. After tests complete, stop the process. The Mockoon CLI supports Docker — the official image is mockoon/cli — which is ideal for containerized CI environments.
What are Mockoon response rules and how do they work?▼
Response rules let you serve different responses for the same route based on request properties like headers, body content, query parameters, or route parameters. For example, you can return a 200 response when a header X-User-Role is admin, and a 403 response otherwise. Rules are evaluated in order, and the first matching rule wins. This makes it possible to simulate different API behaviors (authenticated vs unauthenticated, found vs not found) without creating separate routes.
What is a Mockoon data bucket?▼
Data buckets are reusable, in-memory data stores in Mockoon. You define a named bucket with an initial JSON value (which can use Handlebars/Faker templating). Routes can read from and write to buckets using the dataRaw and setData helpers, simulating a stateful API. This means you can mock a full CRUD API: a POST creates an item in the bucket, a GET reads from it, a DELETE removes it — and the data persists across requests during the server session. Data buckets reset to their initial values when the server restarts.
Does Mockoon support HTTPS and custom certificates?▼
Yes. Mockoon supports TLS/HTTPS for mock servers. In the environment settings you can enable HTTPS, and Mockoon will generate a self-signed certificate automatically. You can also provide your own certificate and key files. This is useful when your application code enforces HTTPS-only requests or when you need to test TLS-specific behavior. In the CLI, pass --https to enable it. Remember to configure your HTTP client to trust the self-signed cert (or disable cert verification in development).
Related Products
on GumroadTypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →DevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →DevPlaybook Interview Vault
210+ real technical interview questions with model answers, asked at Google, Meta, Amazon, Microsoft, Stripe, and Shopify. Covers Frontend (55), Backend (55), System Design (50), and DSA (50). Available in English and Traditional Chinese.
Buy on Gumroad →You Might Also Need
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
HTTP Status Code Reference
Complete HTTP status code reference. Search all 1xx, 2xx, 3xx, 4xx, and 5xx codes with plain-English descriptions, real-world use cases, and when to use each in REST APIs.
Open free tool →
API Request Builder
Build and test HTTP requests visually with any method, headers, and body. Generate cURL commands instantly. Free online API testing tool with Pro unlimited access. No signup required.
Open free tool →
More Free Tools
Related Articles
MSW 2.0: The Best Way to Mock APIs in Frontend Tests
A complete guide to Mock Service Worker (MSW) 2.0 — setup, request handlers, Vitest and Jest integration, Storybook mocking, and best practices for realistic API mocking in frontend tests.
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
API Testing in 2026: From cURL to Automated Test Suites
Complete API testing guide 2026: cURL basics to Postman, Insomnia, and automated suites with JavaScript and Python. Real examples included.
10 Best Free API Testing Tools in 2025 (Postman Alternatives Included)
Best free API testing tools in 2025: Postman free tier, Bruno, Insomnia, Hoppscotch, HTTPie, Thunder Client, and more. Full feature comparison included.
Webhook Testing: How to Debug, Inspect, and Replay Webhooks in 2026
Complete guide to webhook testing. Covers local tunneling, replay tools, signature verification, retry handling, and the best practices for testing webhooks without production data.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →