Mock JSON Payload Generator
Generates random nested JSON payloads for API testing and webhook simulation
Generated 24 words · 375 characters
See 3 examples
- Example 1
{ "event_id": "c995880d-97b8-4d1f-a8db-d063179f263e", "event_type": "trial_started", "user_id": "1541b6cf-ccc0-4822-ab70-7eac5bc50da5", "session_id": "b595d8d0-9ca6-43ad-ad37-d3828b5d66b9", "timestamp": "2026-11-27T15:20:24.189Z", "properties": { "page": "/cart", "referrer": "duckduckgo.com", "device": "desktop", "browser": "Firefox 124.0" } } - Example 2
{ "event_id": "af0008e0-0935-4399-8144-e8a9c6aead8f", "event_type": "signup", "user_id": "439fb01b-a6e7-4eba-92d3-386ce3f0bc08", "session_id": "0125993b-c487-416e-b233-52511fcd5d1c", "timestamp": "2026-11-27T00:16:21.318Z", "properties": { "page": "/checkout/payment", "referrer": "google.com", "device": "tablet", "browser": "Chrome 116.0" } } - Example 3
{ "event_id": "05f63d3a-feb4-46ca-ac1a-963766a49770", "event_type": "click", "user_id": "ec3985f8-178d-4254-90c1-c567fd992b98", "session_id": "ecc13edf-c41e-4137-b152-9c42dda87e7c", "timestamp": "2026-11-27T00:47:55.056Z", "properties": { "page": "/help/articles/43298", "referrer": "linkedin.com", "device": "mobile", "browser": "Edge 123.0" } }
About this generator
Webhook endpoints, message queue handlers, and REST API clients all need test payloads — but writing JSON fixtures by hand is slow, and a missing field or malformed timestamp can send you chasing a bug that was never in your code. This generator produces realistic, nested JSON payloads for five common event types with valid UUIDs, ISO 8601 timestamps, and domain-appropriate field names throughout. The Payload Type selector determines the entire structure. User event produces an event_id, event_type (24 types such as click, pageview, signup, add_to_cart, search, and video_play), user_id, session_id, timestamp, and a properties object with page, referrer, device, and browser fields — ready for analytics pipeline testing. Order includes order_id, customer_id, status enum, total as a decimal string that matches its line items, a currency that matches the shipping country, a nested items array with SKU, product name, qty, and price per line item, and a shipping object with city, country, and postal code. Sensor reading generates device_id, sensor_type (twelve types including temperature, humidity, pressure, light, CO2, and noise) with a matching unit and realistic value range, battery_pct, firmware, timestamp, and a location object with lat and lng. Error response picks from fifteen HTTP error codes, each with its matching message and a fitting details string, plus the request path, method, request_id, and timestamp. Notification produces notification_id, type (email, push, sms, in_app), recipient UUID, a matching title and body from 40 realistic notifications, read boolean, and sent_at. Set count above 1 to get a JSON array for batch seeding or message queue load tests.
How to use
- Select a payload type from the dropdown that matches the API or event shape you need to test.
- Set the count field to the number of payloads you want — use 1 to inspect structure, higher numbers to bulk-generate fixtures.
- Click Generate to produce the JSON output with randomised values, UUIDs, and timestamps.
- Copy the full output and paste it into Postman, curl, your test fixture file, or a mock server body.
- Re-click Generate any time you need a fresh set of randomised values without changing any settings.
Use Cases
- •POST a user-event payload to a new webhook endpoint using curl or Postman
- •Stub an orders API response in MSW while the backend is still under construction
- •Seed a Postgres staging database with 50 randomised sensor readings in one batch
- •Replay structured error-response payloads to verify front-end error-state rendering in Cypress
- •Feed notification payloads into a message queue to load-test parsing throughput
Tips
- →When testing error-handling logic, generate 10+ error-response payloads at once — different status codes and messages will surface edge cases your single fixture won't.
- →Paste a generated payload into JSONSchema.net to auto-derive a JSON Schema, then use that schema to validate real API responses in your test suite.
- →For front-end component testing, generate 5 notification payloads and paste them into a mock service worker or MSW handler to simulate a live feed.
- →Sensor reading payloads work well for testing charting components — generate 20 readings and map the numeric fields to your chart's data array.
- →If your API expects a specific envelope (e.g. wrapped in a 'data' key), generate the inner payload here and manually wrap it — faster than writing the full fixture from scratch.
- →Order payloads include nested line-item arrays, so they're the best choice for stress-testing any parsing logic that recurses into nested structures.
FAQ
how do I use a generated JSON payload to test my webhook endpoint
Copy the output, then run: curl -X POST https://your-endpoint.com/webhook -H 'Content-Type: application/json' -d '<paste payload>'. You can also paste it into the request body in Postman or Insomnia. Make sure your endpoint is listening before you fire the request.
are the UUIDs and timestamps in these payloads actually valid
Yes. UUIDs follow the UUIDv4 format with correct version and variant bits, and timestamps are ISO 8601 UTC strings. Both are randomly generated client-side and have no connection to any real system or record. They pass UUID validation and date parsing in JavaScript, Python, and most other runtimes.
can I generate multiple payloads at once for batch testing
Yes — set the count field above 1 and the output becomes a JSON array of independently randomized payloads. This is handy for seeding a database, batch-testing a parser, or simulating a burst of incoming events in a load test.
which payload types does this generator support
Five types are available: user event (analytics event with properties object), order (line-item array with total, currency, and shipping address), sensor reading (device with lat/lng location and a typed value in a matching unit), error response (fifteen HTTP error codes with matching messages, details, and request_id), and notification (four channel types with read boolean and sent_at). Custom payload shapes are not supported — pick the closest type and edit the copied output.
You might also like
Popular tools from other categories that share themes with this one.