mholt/curl-to-go
mholt/curl-to-go has 1,818 GitHub stars and 167 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-12 19:48 UTC. Last push 2024-11-26.
Convert curl commands to Go code in your browser
Measured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalcurl-to-Go
curl-to-Go is a tool to instantly convert curl commands to Go code in the browser. It does not guarantee high-fidelity conversions, but it's good enough for most API docs that have curl samples.
This is a sister tool to JSON-to-Go, which converts JSON to a Go struct type definition. To do the reverse, check out moul/http2curl.
Try it
Check it out! It works inside your browser. Just give the code a once-over since it will need you to flesh out some parts like error handling.
FAQ
Does any curl command work?
Any curl command should work, but only certain flags are understood and converted into Go code. The rest of the flags will be ignored.
Which kinds of curl commands are understood?
Mostly simple HTTP commands (headers, basic auth, body, etc).
Will you consider supporting this-or-that flag?
curl has like a bajillion options, so don't expect all of them to be implemented; just the most common/important ones to stub out code from API samples and docs, etc. But feel free to open an issue or submit a pull request! To request a new flag, please provide the equivalent Go code.
Credits
curl-to-Go is brought to you by Matt Holt (mholt6). Enjoy!
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
562,144 starspublic-apis/public-apis
A collective list of free APIs
498,537 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
455,281 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,412 stars