Online Go Compiler
Write and run Go programs online with Go 1.25. Press Run and your code is compiled and started with go run, with compile errors and output shown next to the editor. Try out slices, maps, goroutines and the standard library without installing Go.
How to run Go code online
- This page opens with Go selected, so you can start typing straight away.
- Write your code in the editor, or open files from your computer: single files, or a whole project as a .zip.
- Press Run, or Ctrl+Enter. The output appears in the panel beside the editor, and when the program asks for input you type it there and press Enter.
- Share a copy with a link, or save your files to your computer.
Go 1.25 on Online IDE
- Programs run with go run, so they are compiled and started in one step.
- Your file needs package main and a func main, as in any Go program.
- Read input with fmt.Scan or bufio.Scanner and type it in the output panel.
Example: a Go program that reads input
package main
import "fmt"
func main() {
var n int
fmt.Print("Show the first how many squares? ")
fmt.Scan(&n)
for i := 1; i <= n; i++ {
fmt.Printf("%d squared is %d\n", i, i*i)
}
}
Features of this tool
- Simple and fastA clean, lightweight editor that opens instantly.
- Powered by AceThe Ace code editor, with syntax highlighting, autocompletion and bracket matching.
- Interactive programsType input into the terminal while your program runs.
- Several filesWork in tabs, open files or a .zip from your computer, and save the project back to disk.
- Made for learningHelpful for beginners to learn and practice programs.
- Light and dark themesPlus 39 editor themes, a choice of coding fonts, and Vim, Emacs or VS Code keys.
- Keep your outputCopy or download the program output in one click.
- Share by linkSave your code in the cloud and open it anywhere.
Frequently asked questions
Which Go version does Online IDE use?
Go 1.25, on Linux. Golang and Go are the same language.
How is my Go code compiled?
With go run, which compiles your program and starts it straight away. Compile errors show with line numbers in the output panel.
Can my Go program read input?
Yes. Use fmt.Scan, fmt.Scanln or a bufio.Scanner on os.Stdin, then type into the output panel while it runs.
More Go tools
Contact us
For any feedback, queries or issues, please feel free to contact us or write to . We value your input and are committed to providing the best possible experience for our users.