Webhook HMAC Signer
Sign and verify GitHub, Stripe, and Slack webhook signatures locally.
OpenPaste a curl command and get a fetch() starting point for your JavaScript.
Multi-line commands with backslashes are fine.
Method, -H headers and -d body are extracted.
Check the URL and body lines against the original.
Copy the snippet or download request.js.
The API documentation only gives curl examples, and you need the same request inside a React app. Translating flags into fetch options by hand is fiddly, so paste the command and start from generated code instead.
The converter reads the method from -X or --request (defaulting to GET), headers from each -H flag, and the body from -d, --data, --data-raw or --data-binary. Backslash line continuations are joined first, so multi-line commands copied from documentation work. The output is a fetch() call with method, a headers object and a body when one was found, followed by a .then chain that logs the response text. When the command has no headers, an Accept: application/json header is added as a placeholder. Copy the code or download it as request.js.
The parser is deliberately simple, so compare the output with the original before using it. It finds the URL reliably when the URL is wrapped in quotes; with an unquoted URL followed by quoted headers, it can pick up a header as the URL. Bodies are read up to the first quote character, so a JSON body in single quotes is cut off at its first double quote, and you should paste JSON bodies into the generated code yourself. Long-form --header, -u, -F, -b and --json are not recognized, and -d without -X stays GET. To try the request from the browser, the API tester accepts the same method, headers and body, and the JavaScript formatter tidies the result.
Conversion is text processing inside this page. The command is never executed and the URL is never contacted.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
No. The only output is JavaScript using fetch(), which runs in browsers and in Node.js 18 and later.
The URL was not quoted, and the parser picked up the first quoted value in the command instead. Wrap the URL in single or double quotes and the correct address is used.
No. Add an Authorization header yourself containing the word Basic followed by the Base64 encoding of user:password.