CURL CONVERTER
cURL converter, paste and convert.
Paste a curl command copied from your terminal and get Python (requests), JavaScript (fetch), Go or Java request code instantly. Everything runs locally in your browser.
Paste a curl command first.
Everything runs locally in your browser
How do I use the cURL converter?
Paste a curl command on the left (copy it from your browser DevTools “Copy as cURL” or Postman “Copy as cURL”). The tool detects the method, URL, headers, body and auth, then generates runnable code. Switch the language to see each version. Common flags like -X/-H/-d/-u/-G/-F are supported.
示例与注意事项Example & notes
一个例子A worked example
把浏览器「Copy as cURL」得到的一整段命令粘进来,立刻得到等价的 Python requests 与 Go 代码,连请求头和 body 都补齐。Paste a whole "Copy as cURL" command and get equivalent Python requests and Go code, headers and body included.
注意事项Things to watch
- 命令里的 Cookie、Authorization 等敏感信息会原样出现在生成代码中,粘贴或分享前请先替换占位符。Cookies and Authorization headers appear verbatim in the generated code — swap them for placeholders before sharing.
- 多行命令(反斜杠续行)可直接粘贴,解析时会自动合并。Multi-line commands with backslash continuations can be pasted as-is; the parser joins them.
- shell 特性(管道、变量展开、命令替换)不在支持范围,转换前请先还原成纯 curl 命令。Shell features such as pipes, variable expansion and command substitution are not supported — reduce the input to a plain curl command first.
相关问答More Q&A
支持哪些目标语言?Which target languages are supported?
Python requests、JavaScript(fetch/axios)、Go、Java、PHP、Node 等常见写法,生成后可直接复制进项目。Python requests, JavaScript (fetch/axios), Go, Java, PHP and Node — ready to copy into your project.
会真的请求这个地址吗?Will it actually call that URL?
不会。只做文本解析与代码生成,不会发出任何网络请求,内网地址也能安全粘贴。No. It only parses text and writes code, so even internal hostnames are safe to paste.