# cURL to Go

Convert curl to Go (net/http). Client-side and secret-safe, with guides for HTTP methods, content types and auth schemes.

Paste a curl command and get idiomatic Go. Parsing and code generation happen entirely in your browser.

## Guides

- [Convert a cURL GET request to Go](https://toolpaper.manavdev.site/how-to/curl-get-in-go.md): Convert a curl GET command to Go (net/http). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL POST request to Go](https://toolpaper.manavdev.site/how-to/curl-post-in-go.md): Convert a curl POST command to Go (net/http). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PUT request to Go](https://toolpaper.manavdev.site/how-to/curl-put-in-go.md): Convert a curl PUT command to Go (net/http). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PATCH request to Go](https://toolpaper.manavdev.site/how-to/curl-patch-in-go.md): Convert a curl PATCH command to Go (net/http). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL DELETE request to Go](https://toolpaper.manavdev.site/how-to/curl-delete-in-go.md): Convert a curl DELETE command to Go (net/http). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Send JSON with cURL in Go](https://toolpaper.manavdev.site/how-to/send-json-with-curl-in-go.md): Convert a curl command that sends JSON into Go (net/http). Body serialization, Content-Type, and encoding handled correctly.
- [Send form-urlencoded with cURL in Go](https://toolpaper.manavdev.site/how-to/send-form-with-curl-in-go.md): Convert a curl command that sends form-urlencoded into Go (net/http). Body serialization, Content-Type, and encoding handled correctly.
- [Send multipart form-data with cURL in Go](https://toolpaper.manavdev.site/how-to/send-multipart-with-curl-in-go.md): Convert a curl command that sends multipart form-data into Go (net/http). Body serialization, Content-Type, and encoding handled correctly.
- [Send XML with cURL in Go](https://toolpaper.manavdev.site/how-to/send-xml-with-curl-in-go.md): Convert a curl command that sends XML into Go (net/http). Body serialization, Content-Type, and encoding handled correctly.
- [Send GraphQL with cURL in Go](https://toolpaper.manavdev.site/how-to/send-graphql-with-curl-in-go.md): Convert a curl command that sends GraphQL into Go (net/http). Body serialization, Content-Type, and encoding handled correctly.
- [cURL with Bearer token in Go](https://toolpaper.manavdev.site/how-to/curl-bearer-auth-in-go.md): Convert a curl command using Bearer token to Go (net/http). Credentials pass through cleanly and can be redacted before you share.
- [cURL with Basic auth in Go](https://toolpaper.manavdev.site/how-to/curl-basic-auth-in-go.md): Convert a curl command using Basic auth to Go (net/http). Credentials pass through cleanly and can be redacted before you share.
- [cURL with API key in Go](https://toolpaper.manavdev.site/how-to/curl-api-key-auth-in-go.md): Convert a curl command using API key to Go (net/http). Credentials pass through cleanly and can be redacted before you share.
- [401 Unauthorized in Go](https://toolpaper.manavdev.site/how-to/curl-401-in-go.md): The server accepted the request shape but rejected your credentials or scheme. Convert the failing curl into Go (net/http) and inspect what's actually being sent.
- [CORS error in Go](https://toolpaper.manavdev.site/how-to/curl-cors-in-go.md): curl doesn't enforce CORS. Fetch and Axios do. A working curl doesn't mean a working browser call. Convert the failing curl into Go (net/http) and inspect what's actually being sent.
- [SSL certificate error in Go](https://toolpaper.manavdev.site/how-to/curl-ssl-in-go.md): Self-signed or expired certs will break in strict clients even though -k made curl happy. Convert the failing curl into Go (net/http) and inspect what's actually being sent.

---

Source: https://toolpaper.manavdev.site/curl-to-go · Converter: https://toolpaper.manavdev.site/curl-converter