API Response Generator

Resource
Shape
Fields
    More options
    Key style
    Error format
    Indent
    Options
    GET
    
                                                
                                            

    How it works

    How to use the API Response Generator

    Realistic JSON, real status codes and ready-to-paste code for any endpoint.

    1. Step 1

      Pick a resource

      Users, products, orders and six more.

    2. Step 2

      Shape the response

      Fields, record count, status code and seed.

    3. Step 3

      Copy or download

      JSON, headers, cURL, fetch or TypeScript.

    • Free to use
    • No sign-up
    • Runs in your browser

    Mock API data for every endpoint

    • Realistic fake data

      Names, emails and prices that match up.

    • Real status codes

      Matching error bodies from 400 to 503.

    • Repeatable with a seed

      Same seed, same JSON, every time.

    • TypeScript and fetch

      Types, mocks and snippets, ready to paste.

    API Response Generator FAQ

    What is an API mockup tool?

    An API mockup tool creates realistic mock API responses without a real backend. Pick a resource such as users or orders, choose the fields, how many records and the HTTP status, and it builds the JSON body, the response headers and the code to call the endpoint. Use it for frontend work, tests, demos and API documentation.

    Is this API response generator free to use?

    Yes, it is completely free, with no sign-up and no limits. Everything runs in your browser: your fields, settings and history stay on your device and nothing is sent to a server.

    What export formats are supported?

    Copy or download the response body as JSON, the headers as text, a cURL command, a fetch() snippet, a JavaScript mock module with a mockFetch() helper that waits for your chosen latency, and TypeScript with interfaces generated from your fields.

    How do I generate fake JSON data for testing?

    Choose a resource, switch fields on or off or add your own (name, email, UUID, number range, enum, date, image URL and more), set how many records you need and press Generate response. Lock the seed under More options to get the same JSON every time, which keeps test snapshots stable.

    What does an API error response look like?

    Pick an error status and the body changes to match: 400, 401, 403, 404, 409, 422, 429, 500 and 503 each return an error object with a code, a readable message and a request ID, and 422 lists the invalid fields. Switch the error format to Problem JSON for the RFC 9457 shape with type, title, status, detail and instance.

    What is a paginated API response?

    A paginated response returns one page of records plus what you need to fetch the rest. Here that is a data array, a meta object with the page, page size, total and total pages, links to the first, next and last pages, and matching Link and X-Total-Count headers.