HTTP Request Builder
Build GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS requests with query parameters, headers, authorization and JSON, form or raw bodies, all in one clear form.
Build an HTTP request visually and get ready-to-use code in cURL, JavaScript, Python, PHP, Laravel and Go. Import cURL commands too. Fast, free and no signup.
Query parameters are added to the end of the URL.
Add request headers. Content-Type is added for you when you choose a body type.
Text fields only. File uploads are not supported in this builder.
This tool only builds code. It never sends your request anywhere, and nothing you enter is saved or uploaded.
Pick GET, POST, PUT, PATCH or another method and enter the endpoint URL.
Add query params, headers, authorization and a JSON, form or raw body.
Choose cURL, JavaScript, Python, PHP, Laravel or Go and copy the code.
Looking for a free HTTP request builder? Choose a method, enter a URL, add query parameters, headers, authorization and a request body, and instantly get ready-to-use code for cURL, JavaScript fetch, axios, Python requests, PHP cURL, the Laravel HTTP client and Go. You can also paste an existing cURL command and convert it to code in another language. The tool works as an HTTP request generator, a cURL command builder and a cURL to code converter, with no signup and nothing to install. It does not send your request, so you can safely build requests for any API without CORS limits or accounts. Copy the code into your project, your terminal or your API documentation and test it where it belongs.
This HTTP request builder is also a cURL command generator, a cURL to Python converter and a quick code generator for JavaScript fetch, axios, PHP, Laravel and Go. Developers use it to document an API call, share a request with a teammate, move a command from the terminal into code, or start an integration without writing the boilerplate by hand. It builds the request and generates the code. It does not send anything, so there are no CORS limits and nothing leaves your browser.
Build GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS requests with query parameters, headers, authorization and JSON, form or raw bodies, all in one clear form.
Get a clean multi-line cURL command you can run in your terminal, or paste a cURL command and import it to edit it visually and convert it to other languages.
Generate cURL, JavaScript fetch, axios, Python requests, PHP cURL, Laravel Http client and Go net/http code from the same request with one click.
An HTTP request is a message that a client, such as a browser, a mobile app or a script, sends to a server to ask for data or to make a change. Every request has a method that says what you want to do, a URL that says where to send it, headers that give extra information, and sometimes a body that carries data. APIs use HTTP requests so that different programs can talk to each other. Building a request correctly, with the right method, headers and body format, is the first step in working with any REST API.
Creating a request and generating code takes only a few steps.
API documentation often shows examples as cURL commands. To use one in your own code, open Import from a cURL command, paste the command and click Import. The builder reads the method, URL, query string, headers, basic authentication, bearer token and body, and fills in the form. Then switch between the code tabs to see the same request in Python requests, JavaScript fetch, axios, PHP, Laravel or Go. The importer understands common options such as -X, -H, -d, --data-raw, --data-urlencode, -F, -u and --url. Options that do not change the request, such as -L, -s and --compressed, are ignored.
The method tells the server what kind of action you want. This table summarises the most common ones.
| Method | Typical use | Request body | Idempotent |
|---|---|---|---|
GET | Read a resource or list of resources | Normally none | Yes |
POST | Create a resource or trigger an action | Yes | No |
PUT | Replace a resource completely | Yes | Yes |
PATCH | Update part of a resource | Yes | Not guaranteed |
DELETE | Delete a resource | Usually none | Yes |
HEAD | Same as GET, but returns headers only | None | Yes |
OPTIONS | Ask which methods and options a resource supports, also used in CORS preflight requests | Usually none | Yes |
An idempotent request has the same effect whether you send it once or several times. GET and HEAD requests normally have no body, so this tool leaves the body out of the code for those methods and shows a warning.
Query parameters appear after a question mark in the URL and are best for filtering, sorting and paging, such as ?page=2&limit=20. Headers carry information about the request itself, such as the format you accept or your credentials. The body carries the main data you send when creating or updating something. Sensitive values such as passwords and tokens should go in headers or the body over HTTPS, not in the URL, because URLs are often stored in logs and browser history.
| Header | Purpose |
|---|---|
Content-Type | The format of the request body, such as application/json |
Accept | The response formats the client can handle |
Authorization | Credentials, such as a bearer token or basic authentication |
User-Agent | Identifies the client software |
Cache-Control | Instructions about caching |
Accept-Language | The languages the client prefers |
X-API-Key | A common custom header name used by some APIs for an API key |
Everything you enter stays in your browser. The builder does not send requests, does not save your data and does not upload it. Still, the generated code contains whatever you typed. Turn on Use placeholders for secrets to replace tokens, passwords and API keys with safe placeholder text before you copy code into documentation, tickets or chat. Never commit real secrets to a public repository.
This is a request builder and code generator, not an API client. It does not send requests or show responses, so you run the generated code in your terminal or your project to test the API. It does not upload files, run OAuth sign-in flows or store request history. Generated code is meant as a starting point, so add your own error handling and read the API documentation for details such as rate limits.
This is the kind of command the builder creates when you choose POST, add a JSON body, a Content-Type header and a Bearer token.
curl -X POST "https://api.example.com/users" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"name":"Ali","email":"ali@example.com"}'
Switch to JS fetch, axios, Python, PHP cURL, Laravel or Go and the same request is written in that language. Turn on placeholders for secrets so that real tokens do not end up in code you share.
| Tab | Best used for | Typical place to run it |
|---|---|---|
| cURL | Testing an API from the terminal and sharing a request in documentation or bug reports. | Command line, CI scripts |
| JS fetch | Calling an API from the browser or modern Node.js without a library. | Frontend code, Node.js |
| axios | Projects that already use the axios library. | Frontend and Node.js apps |
| Python | Scripts, data jobs and automation that call an API. | Python scripts and notebooks |
| PHP cURL | Plain PHP projects with no framework. | PHP servers and scripts |
| Laravel | Laravel applications that use the built-in HTTP client. | Laravel controllers and jobs |
| Go | Services and tools written in Go. | Go programs |
After you run the generated code, the server answers with a status code. These are the ones developers see most often when they test APIs.
| Code | Meaning | What to check |
|---|---|---|
| 200 OK | The request worked. | Nothing to fix. Read the response body. |
| 201 Created | A new resource was created. | Usually the answer to a successful POST. |
| 204 No Content | Success with an empty body. | Common for DELETE and some PUT requests. |
| 301 / 302 | The URL moved. | Follow the redirect or update the URL. |
| 400 Bad Request | The server could not understand the request. | Check the JSON syntax, parameters and required fields. |
| 401 Unauthorized | Credentials are missing or wrong. | Check the token, API key or Authorization header. |
| 403 Forbidden | You are known but not allowed. | Check permissions, scopes and IP rules. |
| 404 Not Found | The resource or path does not exist. | Check the URL, the ID and the API version. |
| 415 Unsupported Media Type | The server does not accept your body format. | Check the Content-Type header. |
| 422 Unprocessable Entity | The data is valid JSON but fails validation. | Read the error message for the field names. |
| 429 Too Many Requests | You hit a rate limit. | Slow down or retry after the time the API gives. |
| 500 / 502 / 503 | A server-side problem. | Retry later and contact the API owner if it continues. |
cURL is the most common way to share an HTTP request. These are the options you will see in generated commands.
| Option | Meaning | Example |
|---|---|---|
| -X | Sets the HTTP method. | -X POST |
| -H | Adds a header. | -H "Accept: application/json" |
| -d | Sends request body data. | -d '{"a":1}' |
| -u | Sends Basic authentication. | -u user:password |
| -F | Sends form-data fields or files. | -F "file=@photo.png" |
| -G | Sends data as a query string with GET. | -G -d "q=test" |
| -L | Follows redirects. | -L |
| -i | Shows response headers. | -i |
The HTTP request builder runs in your web browser, so you can generate cURL, fetch, Python and PHP code online on Android, iPhone, Windows, Mac and Linux. Whether you search for a cURL generator for Mac, a Postman alternative for quick code or a way to convert cURL to code on your phone, the steps are the same: open the page, set the method and URL, add your details and copy the code.
API work usually involves a few more small jobs. These related free tools can save you time:
Our HTTP request builder is free to use with no registration, no watermark and no limits. Everything runs in your browser. It works on desktop, tablet and mobile.
Quick answers to common questions about building HTTP requests and generating cURL and API code online.
It is a tool that helps you create an HTTP request by filling in the method, URL, parameters, headers, authorization and body, then generates the code for that request in languages such as cURL, JavaScript, Python and PHP.
Fill in the request details, then choose a language tab such as cURL, Python or Laravel. The code updates instantly and you can copy it with one click.
Yes. Open Import from a cURL command, paste your command and click Import. The builder fills in the request, and you can then switch to Python, JavaScript, PHP, Laravel or Go to copy the converted code.
No. It only builds the request and generates code. To test an API, run the generated code in your terminal or project. This also means there are no browser CORS limits to worry about.
Your input stays in your browser and is not saved or uploaded. The generated code contains what you typed, so use the placeholder option before sharing code, and never publish real secrets.
Use GET to read data, POST to create something or trigger an action, PUT to replace a resource completely, PATCH to change part of a resource, and DELETE to remove it. Always follow the documentation of the API you are using.
No. Everything runs in your browser and nothing you enter is uploaded, saved or shared.
Build an HTTP request, format JSON, decode a JWT or encode and decode Base64 in seconds. Explore free developer tools to format, convert and debug your data in one place.
Explore All Developer Tools →