cURL Converter

Paste a cURL command, for example from your browser’s DevTools “Copy as cURL”, and get the same request as fetch, Axios, Python, Go, PHP or Node code. Or convert a fetch() call back to cURL.

Converted locally; tokens and cookies stay on your machine
cURL command
Code
fetch() call
cURL

Handles DevTools “Copy as fetch” output and hand-written calls with literal URLs, headers and bodies (including JSON.stringify({...})). Variables can’t be resolved without running the code, which this page never does.

Frequently Asked Questions

How do I get a cURL command for a request in my browser?

Open DevTools (F12), go to the Network tab, right-click a request and choose Copy → Copy as cURL (bash). Paste it here to turn it into code.

Is it safe to paste commands that contain tokens or cookies?

Conversion happens entirely in your browser with no network requests, and nothing is stored. Still, treat the generated code as sensitive if it contains credentials.

Which curl options are supported?

-X, -H, -d / --data / --data-raw / --data-binary / --data-urlencode, --json, -F, -u, -b, -A, -e, -G, -I, -k, -L, --compressed and --url. Output-only flags such as -s, -v, -o and -i are ignored.

Why is -k (insecure) not translated?

Disabling TLS verification is rarely what you want in code. The converter adds a comment instead of silently turning verification off.

More Developer Tools

JSON ToolsFormat, validate, minify & compare JSON JSON FormatterPretty-print and beautify JSON CSV Viewer & EditorView, edit and convert CSV files YAML ConverterConvert YAML to JSON and back Regex TesterTest regular expressions live Text DiffCompare two texts side by side JWT ToolDecode, encode, compare and verify JWTs JWT DecoderInspect JWT header and payload XML FormatterFormat, validate and convert XML URL EncoderEncode, decode and parse URLs Base64Encode and decode Base64 strings Hash GeneratorSHA-256, MD5, HMAC and CRC32 SHA-256Generate SHA-256 checksums MD5 GeneratorGenerate MD5 hash values Text ToolsCase convert, count and transform text Number ConverterBinary, hex and octal converter Token CalculatorEstimate LLM token counts from text PDF EditorEdit text, sign and annotate PDFs Schema GeneratorJSON to TypeScript, Go, Rust, Python IndexNowSubmit URLs to Bing, Yandex & more PII RedactorMask personal data & keys before AI Timestamp ConverterUnix epoch to date and back UUID GeneratorUUID v4/v7, ULID, Nano ID Password GeneratorSecure passwords & passphrases MCP Config BuilderConfigs for Claude, Cursor, VS Code AGENTS.md GeneratorCLAUDE.md, Cursor rules, Copilot AI Crawler Controlsrobots.txt for AI bots & llms.txt Cron ParserExplain crontab, next run times SQL FormatterBeautify & minify SQL queries cURL ConvertercURL to fetch, Python, Go, PHP Chat Export ConverterChatGPT/Claude export to Markdown Markdown PreviewLive GFM preview & to HTML Color & ContrastHEX/RGB/OKLCH, WCAG checker QR Code GeneratorURL, Wi-Fi, vCard; PNG & SVG Tool Schema ConverterOpenAI ↔ Anthropic ↔ Gemini ↔ MCP JSONL ValidatorFine-tuning & batch files SSE Stream ParserReassemble LLM streaming responses Prompt Template & DiffFill {{vars}}, compare versions