curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.
Takes a `curl` command — usually one copied out of a browser’s network panel — and writes the equivalent request in fetch, Python, Go, Node or another target. It parses with real POSIX quoting rules, so a JSON body full of escaped quotes comes through intact.
curl command
fetch
Parsed request
Method
POST
Headers
2
Body
31 chars
$'…' strings — so bodies with escaped JSON survive intact. Nothing is executed and no request is sent; $VARIABLES are kept literally and flagged, since only your shell knows their values.How to use it
Copy the request as cURL
Every browser’s network panel has "Copy as cURL" in its context menu. Paste that here, backslashes and all.
Choose the target
The generated code carries the method, the headers, the body and basic auth if there was any. Nothing is sent from this page.
Check the parsed summary
It shows the method, the header count and what the body was read as. Anything the parser could not map is listed as a warning rather than being dropped.
Common questions
Are my credentials sent anywhere?
No. Nothing is executed and no request is made — the command is parsed as text in your browser. That said, a cURL copied from a network panel usually contains a live session cookie or bearer token, so treat the generated code the same way you would treat a password.
Why is `$TOKEN` still in the output?
Because only your shell knows what it expands to. A variable is kept literally and flagged, rather than being guessed at or silently emptied — an empty Authorization header is a much worse bug than a visible placeholder.
Does it handle file uploads?
A `-F` multipart form is parsed and reported, but a `@filename` reference points at a file this page cannot read, so the generated code has a placeholder where the file goes. Everything else in the request is complete.
Feed it from
OpenAPI Linter
Checks an OpenAPI document for missing responses, unused schemas, references that point at nothing and the other faults that break code generators.
HAR Viewer & Sanitiser
Opens a HAR capture as a waterfall and strips cookies, auth headers and tokens before you share it.
HTTP Request Builder
Composes and sends a GET/POST/PUT/PATCH/DELETE/HEAD request with custom headers and a body, and shows the status, headers, body and timing — without ever forwarding cookies or Authorization.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
Next
These accept what this tool produces, so the result can go straight in.
HAR Viewer & Sanitiser
Opens a HAR capture as a waterfall and strips cookies, auth headers and tokens before you share it.
HTTP Request Builder
Composes and sends a GET/POST/PUT/PATCH/DELETE/HEAD request with custom headers and a body, and shows the status, headers, body and timing — without ever forwarding cookies or Authorization.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
OpenAPI Linter
Checks an OpenAPI document for missing responses, unused schemas, references that point at nothing and the other faults that break code generators.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
Text Hash
Computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 of a string, with an uppercase and Base64 output option.