Go 1.22

Online Go Compiler

Write, build and run concurrent Go programs with goroutines and channels. Write code with auto-formatting, test with standard input (stdin), and inspect terminal output in real-time.

✓ Goroutines and channels✓ Slices, maps and structs✓ Fast compile times✓ bufio standard input
main.go
Go 1.22
13px
Standard Input (stdin)
Passed to scanf, input(), cin, etc.
UTF-8Go (Golang)2 SpacesWrap: Off
Ctrl+Enter to Run
Ln 1, Col 129 lines589 chars
Output & ConsoleIdle

Ready to Compile & Run

Click the blue ▶ Run button in the header bar or press Ctrl + Enter to compile and execute your Online Go Compiler.

How to Run Go (Golang) Code Online

Build and run Go applications using package main and standard library tools.

  1. Include package main and import required standard packages.
  2. Press "▶ Run" or Ctrl + Enter.

Common Errors & Troubleshooting

Encountering compilation or runtime diagnostics? Check these common scenarios:

imported and not usedRemove unused package imports to satisfy the Go compiler.

Related Popular Language Compilers

View all 35+ compilers →
Python 3.py

Write, run and test Python 3 code in your browser with interactive standard input

JavaScript (Node.js).js

Execute modern ES6+ JavaScript code in an isolated high-speed runtime

TypeScript.ts

Type-safe JavaScript playground with instant transpilation and type validation

HTML / CSS / JS.html

Multi-pane web editor with live preview, responsive device frames and instant rendering

Frequently Asked Questions (Go (Golang))

Yes, goroutines and channels run with full synchronization support.