Convert CURL commands to Golang code online

Curl command

Examples: GET - POST - JSON - Basic Auth - Files - Form

CURL to Go Online

This tool helps you to generate Go code based on CURL Command. Copy and Paste CURL Command and Generate Go.

What can you do with CURL to Go Converter Online?

  • CURL to Go is very unique tool to convert cURL command to http request of Go. The input provide by the user's cURL command to generate Go Code.
  • This tool saves your time and helps to generate Go code with ease.
  • CURL to Go works well on Windows, MAC, Linux, Chrome, Firefox, Edge and Safari.

what is CURL?

cURL is an open-source command line tool that downloads files from the web. It supports a variety of protocols, including HTTP, HTTPS, FTP, SFTP, TFTP, Gopher and others.

How do convert CURL to Go code? 

Step1: Paste and convert your CURL requests to Go code

Step2: Copy Go code

Convert CURL to Go example

Go Code
package main

import (

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("GET", "", nil)
	if err != nil {
	resp, err := client.Do(req)
	if err != nil {
	defer resp.Body.Close()
	bodyText, err := io.ReadAll(resp.Body)
	if err != nil {
	fmt.Printf("%s\n", bodyText)