Hello, World!
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}Tap Run to execute
main.go · output appears here
Press Run to execute
Output streams here as your program runs.
Go, often called Golang, is a statically typed, compiled language created at Google by Robert Griesemer, Rob Pike, and Ken Thompson, with its first open-source release in 2009. It was designed for simplicity, fast compilation, and ease of building reliable, concurrent software. Go features garbage collection, a clean syntax, built-in goroutines and channels for concurrency, and a strong standard library.
Today Go is a leading language for cloud infrastructure, networked services, and command-line tools, powering projects like Docker, Kubernetes, and many backend APIs. Its single static binaries and fast builds make deployment simple. CompileBytes builds the Go package from main.go and its helper tabs in an isolated Go 1.26.5 environment, including modern language features, goroutines, generics, and the standard library, without requiring a local toolchain.
main.go is the entry point. Add helper files from the explorer and import them into your project.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
Both .go files belong to package main; no import is needed between them.
package main
import "fmt"
func main() {
fmt.Println(answer())
}
package main
func answer() int {
return 42
}
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}package main
import "fmt"
func main() {
var name string
fmt.Scanln(&name)
fmt.Printf("Hello, %s!\n", name)
}package main
import "fmt"
func main() {
fruits := []string{"apple", "banana", "cherry"}
for i, fruit := range fruits {
fmt.Println(i+1, fruit)
}
}package main
import "fmt"
func factorial(n int) int {
if n <= 1 {
return 1
}
return n * factorial(n-1)
}
func main() {
fmt.Println(factorial(5))
}package main
import (
"fmt"
"strconv"
)
func main() {
n, err := strconv.Atoi("abc")
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println(n)
}package main
import "fmt"
func main() {
counts := map[rune]int{}
for _, c := range "banana" {
counts[c]++
}
for ch, n := range counts {
fmt.Printf("%c: %d\n", ch, n)
}
}package main
import (
"fmt"
"sort"
)
func main() {
nums := []int{3, 1, 2}
sort.Ints(nums)
fmt.Println(nums)
}package main
import "fmt"
type Person struct {
Name string
Age int
}
func (p Person) Describe() string {
return fmt.Sprintf("%s (%d)", p.Name, p.Age)
}
func main() {
p := Person{Name: "Ada", Age: 36}
fmt.Println(p.Describe())
}package main
import "fmt"
func main() {
ch := make(chan int)
go func() {
ch <- 42
}()
fmt.Println(<-ch)
}package main
import "fmt"
func main() {
nums := []int{}
for i := 1; i <= 5; i++ {
nums = append(nums, i*i)
}
fmt.Println(nums)
}The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Type or paste your code into the editor, then click Run (or press Ctrl/Cmd + Enter) to execute it.
Output streams into the console panel, including runtime errors, exit status, and execution time.
Nothing to install and no account to create — code runs in an isolated hosted runtime.
Language-aware autocomplete and IntelliSense suggestions where the editor has a matching language service
Syntax highlighting, with native compiler and runtime errors shown in the console
Bracket matching, auto-indentation, code folding, and a minimap
Multi-cursor editing plus find & replace (Ctrl/Cmd + F)
Full undo/redo history and copy to clipboard
Built on Monaco — the same editor that powers VS Code
Run on demand, or turn on Auto-run to execute on every change
Stop long-running or infinite programs at any time
A real console shows standard output, errors, exit status, and execution time
Pass standard input (stdin) to your program from the Input panel — one value per line
Switch between light and dark themes
Adjust font size and other editor settings
Toggle side-by-side or top/bottom layouts
Enter distraction-free fullscreen mode
Generate a shareable link to your exact code in one click — no login needed
Your work autosaves to your browser, so you can pick up where you left off
Copy the active file to your clipboard
Run code: Ctrl/Cmd + Enter
Find & replace: Ctrl/Cmd + F
Open the full shortcut list from the keyboard icon in the toolbar
Go is one of 23 linked-project compilers. Run always starts main.go; selecting a helper tab changes what you edit, not the entry file.
Both .go files belong to package main; no import is needed between them.
Linked-project languages (23): Node.js, TypeScript, Deno, Python, C, Go, Dart, Swift, Rust, Ruby, PHP, Java, Kotlin, C++, C#, Nim, Crystal, Haxe, Zig, Scala, D, Bun, Objective-C.
Single-file scratchpads (46): Matplotlib, NumPy, pandas, Haskell, Clojure, Perl, Lua, Tcl, jq, Raku, Elixir, Bash, Zsh, Nushell, R, Assembly (NASM), Julia, Octave, Groovy, PowerShell, Visual Basic .NET, Odin, Pascal, Lisp, Erlang, CoffeeScript, COBOL, BASIC, V, Racket, OCaml, Prolog, AWK, Emacs Lisp, Emojicode, Forth, F#, Fortran, Assembly (NASM64), Solidity, Mojo, Ada, WASM (WAT), Gleam, Shell Script (sh), Scheme. Their extra project files are not submitted to the runtime.
Download project exports every Go tab and a README in one ZIP archive.