Skip to main content

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.

✓ Visual route builder, no code needed ✓ Faker.js response templating ✓ Response rules and data buckets ✓ CLI for CI/CD pipelines ✓ Free and open source

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

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

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).

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

OpenAPI Validator HTTP Status Code Reference API Request Builder API Response Mock Generator HTTP Status Code Reference HTTP Status Code Lookup HTTP Status Code Lookup OpenAPI Mock Generator Jest Mock Generator API Response Time Tester HTTP API Tester HTTP Methods Reference HTTP Mock Response Builder OpenAPI Schema Validator API Mock Server Config Generator Jest Testing Framework Guide Mock Service Worker (MSW) API Mocking Guide API Response Mocker API Test Case Generator API Response Formatter & Analyzer HTTP Status Code Reference REST API Request Builder HTTP Headers Analyzer API Rate Limit Calculator HTTP Headers Inspector HTTP Code Snippet Generator LLM Cost Calculator Haproxy Config Validator HTTP Cache-Control Builder HTTP Header Analyzer AI Prompt Cost Calculator HTTP/2 Server Push Headers Builder Vitest Guide — Vite-native Testing Cypress Frontend Testing Guide HTTP Security Headers Checker LLM Prompt Cost Calculator Mock Data Generator AI Rate Limit Calculator HTTP Cache Header Builder API Key Generator AI Doc Generator — Pro Tool AI Unit Test Generator — Pro Tool curl Command Builder HTTP Security Headers Generator Interview Question Generator JSON Diff Viewer JSON Diff Developer Utilities Rate Limiter Tester API Changelog Generator Fake Data Generator Rate Limit Calculator Webhook Tester CORS Policy Builder Caddy Caddyfile Generator HAR Diff Analyzer Vue Component Generator LLM Context Window Calculator LLM Token Counter k6 Load Test Script Generator Playwright E2E Test Generator SSL Certificate Checker Prompt Token Estimator Playwright E2E Testing Guide Pulumi Modern IaC Guide HTML5 Canvas API Playground Prompt Injection Tester Token Context Calculator OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator CSS Flexbox Visualizer

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$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.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →