We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Online Golang Playground – Compiler, Interpreter and Editor

Edit, run, and debug Golang code online for free! Powered by Golang and WebAssembly.

Edit the sample Go project above or write your own program, then press Run. Boot.dev compiles the source to WebAssembly and runs the result in your browser.

Use the playground for quick experiments, standard-library examples, and small multi-file Go programs without creating a local project.

How to use the online Go compiler

  1. Edit main.go and the other .go files, or add another source file.
  2. Press Run to compile the project and print its output or compiler errors in the console.
  3. Change the code and run it again. Your files are saved locally in this browser.

What this Go playground supports

  • Compiled Go code. Send Go source to Boot.dev's compiler service and run the WebAssembly result in your browser.
  • Multi-file packages. Work with up to five .go files in the main package.
  • The Go standard library. Import standard packages for focused examples and experiments.
  • Local autosave. Return to the playground without losing your local files.

Learn Go by building programs

Move beyond isolated snippets with a structured course covering Go syntax, packages, interfaces, concurrency, and real programming exercises.

Learn Go course

(it takes 2 minutes)

Online Go compiler FAQ

Yes. You can edit and run Go code without installing Go or creating an account. An account is only required to create a share link.