Curl to Go Converter
Generate Go net/http code from curl
Convert curl to idiomatic Go using net/http. JSON payloads use json.Marshal; headers are set on req.Header.
Supports multi-line commands with \ line continuations. Conversion runs as you type.
Convert to:
Example curl commands
Supported output targets
| Language | Library | Landing page |
|---|---|---|
| Python | requests or httpx |
curl to Python |
| PHP | curl extension or Guzzle |
curl to PHP |
| Go | net/http |
curl to Go |
| JavaScript | axios |
curl to Axios |
| Java | OkHttp |
curl to Java |
| C# | HttpClient |
curl to C# |
| PowerShell | Invoke-RestMethod |
curl to PowerShell |
Also convert curl to
curl to Go FAQ
Which Go version?
Output uses the standard library only โ no third-party packages required.
Does it support -k insecure?
A comment is added; use a custom Transport with InsecureSkipVerify in production code.