HTTP Request Builder
Build an HTTP request with headers, auth and a body, then copy it as cURL, fetch, Python requests or HTTPie code.
Build an HTTP request and get ready-to-run code for it: cURL, JavaScript fetch, Python requests, HTTPie or PowerShell. Choose the method, enter the URL, add headers, a request body (checked for errors when the Content-Type is JSON) and authentication (Bearer token or basic username and password), and the code updates as you go. It's a quick way to share a reproducible request or move from a terminal command to application code. Nothing is sent from this page.
The cURL output uses single quotes, which work in bash, zsh and macOS Terminal. In Windows PowerShell, call curl.exe and use double quotes instead.
Common use cases
- Write a cURL command to test an API endpoint
- Turn a request into fetch or Python code
- Share an exact request with a colleague in a bug report
How to use
- Choose the method and enter the URL.
- Add headers, body and authentication.
- Pick the output language and copy the code.
FAQ
Does this page send the request?
No. It writes the code; you run it in a terminal or your app.
Is it safe to put my API token in?
It stays in your browser, but anyone you share the code with gets the token. Replace it with a placeholder before sharing.
Related tools
- cURL Command GeneratorGenerate cURL commands for API requests.
- OpenAPI ValidatorValidate OpenAPI/Swagger specification documents.
- Swagger JSON to YAMLConvert Swagger/OpenAPI JSON to YAML format.
- YAML to Swagger JSONConvert Swagger/OpenAPI YAML to JSON format.
- Markdown PreviewPreview Markdown content rendered as HTML in real-time.
- JWT DecoderDecode JWT headers and claims, check expiry, and verify HS256, HS384 or HS512 signatures in your browser.
- HTTP Status CodesIn Reference