Tooling, not traffic
cURL to Code Converter & HTTP Request Inspector — Offline
A cURL command mixes HTTP semantics with shell quoting and cURL-specific behavior. Normalize those layers before translating them into another client.
Normalize the request before choosing a target language
curl -X POST … -H … --data …Quotes, escapes, variables, and line continuations
POST · URL · headers · auth · bodyThe request meaning that can carry across
fetch · requests · net/http · URLSessionClient-specific syntax and defaults
Shell quoting is part of the input language
Single quotes
--data '{"name":"Mole"}'Literal text; a single quote cannot appear directly.
Double quotes
--header "X-Key: $TOKEN"Variables and selected backslash escapes can be interpreted by the shell.
Line continuation
curl https://api.test \ ↵ -H …The backslash must end the physical line.
ANSI-C string
$'line one\nline two'Bash-style escape decoding is not portable to every shell.
Method inference follows the flags, not intuition
Explicit -X / --requestUse the supplied method-I / --headHEADBody data without -GPOST unless overridden-G with dataGET with query parametersNo method hintsGETRedaction pass
Review credentials before generated code enters a repository
- Authorization and Proxy-Authorization
- Cookie values and session IDs
- API keys in headers or query parameters
- Basic-auth user information
- Signed URLs and private hostnames
Authorization: Bearer sk_live_exampleAuthorization: Bearer ${TOKEN}Carry HTTP meaning; report cURL-only behavior
Carry across
- ✓Method, URL, and query
- ✓End-to-end headers
- ✓Authentication intent
- ✓Body bytes and content type
- ✓Cookies when explicitly included
Report separately
- ○Progress and output formatting
- ○TLS/client-certificate switches
- ○Redirect/retry policy
- ○Local file and stream reads
- ○Proxy, resolver, and shell environment
This page never executes the request
No DNS lookup, HTTP connection, redirect, cookie exchange, or response is produced. Generated code is a reviewable starting point, and unsupported semantics remain visible as diagnostics.
cURL conversion questions
- Can I paste “Copy as cURL” from browser DevTools?
- Yes. The parser handles common multiline and quoted forms, then separates captured credentials so you can redact them before copying output.
- Why was a cURL flag omitted from generated code?
- Some flags control cURL output, local files, DNS, TLS, redirects, or retries rather than the core HTTP message. The tool reports these instead of inventing a false equivalent.
- Does converting a request test the API?
- No. Translation is intentionally non-executing, so no endpoint is contacted and no response behavior is verified.