JSON Schema Mock & Validator (Redis Pub/Sub)
Define a JSON Schema per event, generate realistic mock payloads, and validate real messages against it — with Redis Pub/Sub presets and a ready-to-run redis-cli PUBLISH output, all in your browser.
Generate mock payloads
Validate a payload against this schema
How to use the JSON Schema Mock & Validator
- Pick a preset from the New event from dropdown (or leave it as Custom (blank)) and click Add event — each event gets its own tab with a name, a Redis channel, and a JSON Schema.
- Edit the Event name, Redis channel, and JSON Schema fields to match what your system actually publishes.
- Under Generate mock payloads, set a count and click Generate to produce sample payloads that satisfy the schema — copy them as raw JSON or as ready-to-run
redis-cli PUBLISHcommands. - Under Validate a payload against this schema, paste a real JSON message (e.g. one you captured from Redis) and click Validate to check it against the same schema, with any mismatches listed by property path.
Switch between events using the tabs at the top — each keeps its own schema, generated output, and validation state. Your events are saved automatically and restored the next time you open this tool.
How This Tool Works
Each event you define is a JSON Schema (a Draft-07 subset: type, properties, required, enum, minimum/maximum, minLength/maxLength, pattern, format, items, and oneOf/anyOf). That one schema is the single source of truth for both mock generation and validation.
Generating a mock walks the schema and produces a random value satisfying every keyword — a matching format (uuid/email/date-time/uri), a string matching a pattern via a regex-to-string generator, a number inside its min/max range, and so on — so every generated payload is guaranteed to pass validation against the same schema.
Validating a pasted payload walks the same schema and reports every mismatch with its exact property path, so you can check a real message you received from Redis against the contract you defined.
Everything runs client-side in your browser — schemas, generated payloads, and pasted messages are never sent to a server. Your event definitions are saved to your browser's local storage so they survive a page reload.