Webhook HMAC Signer
Sign and verify GitHub, Stripe, and Slack webhook signatures locally.
OpenTurn an API response into interfaces you can import, without typing every field by hand.
Use a real response with as many fields filled as possible.
Nested objects become their own named interfaces.
Mark optional fields and widen null types by hand.
Save the output as types.ts.
You are wiring a third-party endpoint into a React app, and the docs only show an example response. Pasting that example here gives you interfaces to start from, so the editor can catch misspelled property names before they reach production.
The generator walks your JSON from the top. The root object becomes an exported interface named Root, and each nested object becomes its own exported interface named after its key in PascalCase, so a profile field produces a Profile interface. Strings, numbers and booleans map to string, number and boolean, null maps to the null type, and arrays take their element type from the first item, with objects inside arrays named like TagsItem. Empty arrays become unknown[]. The output refreshes as you type, and you can copy it or download it as types.ts.
Because one sample is all it sees, treat the result as a first draft. Fields that are sometimes missing are marked as always present, a value that is null in the sample becomes the null type instead of string | null, and if two different nested objects share a key name, only the first shape is kept. Feed it a response with the optional fields filled in, then add ? to optional properties yourself. For runtime checks to go with the types, generate a Zod or Valibot schema, and if the JSON is minified, expand it with the pretty-print JSON tool first.
Type inference is a small script running on this page, so private response data stays on your machine.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
Root. There is no option to rename it in the tool, so rename it after pasting, or use your editor's rename refactoring to update every reference at once.
They are turned into valid identifiers by replacing the characters with underscores, so first-name becomes first_name. That no longer matches the JSON key, so quote the property name by hand.
Yes. The interface is built from the first element and named RootItem. No wrapper type is emitted for the array itself, so declare a Root type as an array of RootItem if you need one.