Mock Error Response Generator

Runs in browser Mocking

Produce error bodies in RFC 9457 Problem Details, JSON:API errors, Google/AWS/Stripe styles or your custom shape with realistic codes and messages.

TEST DATA ONLY — all generated names, contacts, identifiers and numbers are synthetic and do not belong to real people or accounts.
Privacy: This tool runs entirely in your browser. Your input never leaves your device.
Loading tool…

How to use Mock Error Response Generator

  1. Select the error kind and the format your API uses.
  2. For validation errors, list the field names.
  3. Generate and paste the body into your client tests or mock server.

Mock Error Response Generator features

  • Eleven formats: RFC 9457, JSON:API, Google, AWS, Stripe, Laravel, Django REST, ASP.NET Core, JSend, simple and GraphQL
  • Eleven error kinds from validation (422) to gateway timeout (504) with matching headers
  • Field-level messages inferred from field names
  • Custom detail message override
  • Raw HTTP output plus a status and header summary

Mock Error Response Generator example

Laravel-style validation error

Input:

Fields: email, age
Error: validation, format: Laravel

Output:

HTTP/1.1 422 Unprocessable Content

{
  "message": "Email must be a valid email address.",
  "errors": {
    "email": ["Email must be a valid email address."],
    "age": ["Age must be between 1 and 100."]
  }
}

Frequently asked questions about Mock Error Response Generator

Which formats are available?

RFC 9457 Problem Details, JSON:API errors, Google API, AWS, Stripe, Laravel, Django REST Framework, ASP.NET Core ValidationProblemDetails, JSend, a simple { error } object and GraphQL errors.

Which error kinds can I generate?

Validation (422), bad request (400), authentication (401), forbidden (403), not found (404), conflict (409), payment required (402), rate limit (429), server error (500), unavailable (503) and gateway timeout (504) — each with matching headers.

How are field errors chosen?

From the field names: email gets an invalid-format message, password too-short, terms must-be-true, ids not-found, and so on. Add your own fields to see the mapping.

Can I set the message?

Yes, the custom message replaces the default detail in every format while codes, status and structure stay correct.