Webhook HMAC Signer
Sign and verify GitHub, Stripe, and Slack webhook signatures locally.
OpenGet a runtime validator and its TypeScript type from data you already have.
Samples, JSON Schema, and components.schemas are auto-detected.
Pick the runtime validator library your project uses.
Copy a ready module with inferred types.
Review enums and .strict() options before shipping.
Your frontend trusts whatever the API returns, and a renamed field just shipped a blank dashboard to production. Runtime validation is the fix, but typing out a Zod schema for a thirty-field response by hand is slow and easy to get wrong.
Paste JSON and the desk works out what it is. An object with openapi or swagger at the top is read as an OpenAPI document. One with $schema, properties, type or $ref is treated as JSON Schema. Anything else is a sample, and a schema is inferred from it: integers versus decimals, arrays typed from their first item, and every key required with no extra keys allowed. Choose Zod, TypeBox or Valibot and an export name, then press Generate. The output is a TypeScript module that imports the library, exports the validator and exports the matching type via z.infer, Static or InferOutput.
Mind the detection rules. A sample that happens to have a top-level "type" field, such as an order event, is read as JSON Schema and produces the wrong result, so wrap it in another object or rename the field. With OpenAPI input only the first entry in components.schemas is converted, and its name replaces your export name. $ref links become bare identifiers in Zod and fall back to an any type in TypeBox and Valibot. Zod gets the most detail, including .email(), .url(), .int() and .strict(). For plain interfaces without a runtime library, try JSON to TypeScript, and to produce a JSON Schema to feed back in, use the JSON Schema generator.
Code generation is string building in this page, with no packages downloaded and nothing sent out.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
When the input is a sample, every key present is marked required and extra keys are rejected, since one example cannot show which fields are optional. Add .optional() afterwards, or start from a JSON Schema with a trimmed required list.
No. Integer and number both map to v.number() in the Valibot output. Add an integer check with Valibot's pipe helpers if you need it.
Not currently. Only the first schema under components.schemas is converted. To get another one, paste that schema on its own as JSON Schema.