Raw HTTP Request Parser
Paste a raw HTTP request or response to see its method, URL, headers and body broken out, and convert the request to curl or JavaScript fetch.
Free · No sign-up · Your inputs stay in your browser
Input
Parse a raw HTTP request or response
Output
Request
| Method | POST |
|---|---|
| URL | https://api.example.com/api/v2/orders?dry_run=1 |
| Path | /api/v2/orders |
| Query | dry_run=1 |
| Version | HTTP/1.1 |
| Body | 21 bytes |
| Header | Value |
|---|---|
| Host | api.example.com |
| Authorization | Bearer eyJhbGciOiJIUzI1NiJ9.e30.sig |
| Content-Type | application/json |
| Accept | application/json |
| X-Request-Id | 7f3c9a |
curl
curl -X POST 'https://api.example.com/api/v2/orders?dry_run=1' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.e30.sig' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'X-Request-Id: 7f3c9a' \ --data-raw '{"sku":"A-1","qty":2}'
fetch
const res = await fetch("https://api.example.com/api/v2/orders?dry_run=1", { method: "POST", headers: { "Authorization": "Bearer eyJhbGciOiJIUzI1NiJ9.e30.sig", "Content-Type": "application/json", "Accept": "application/json", "X-Request-Id": "7f3c9a", }, body: "{\"sku\":\"A-1\",\"qty\":2}", });
Headers end at the first blank line and everything after it is the body. Host, Content-Length and Connection are left out of the generated code because curl and fetch set them from the URL and body; a mismatched Content-Length copied by hand is a common source of hanging requests.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Where raw requests come from
Burp Suite and ZAP, Wireshark's Follow HTTP Stream, nc and telnet sessions, curl -v output, server logs that capture full requests and API documentation all show HTTP as text. Turning it into a runnable command is the quickest way to reproduce a call. The message format is defined in RFC 9112.
Headers to leave out
Content-Length, Host and Connection are computed by the client from the URL and body. Copying a stale Content-Length by hand is a classic way to make a request hang or be cut short, which is why the generated code omits it.