Hello World examples
The classic Hello World snippet for 37 programming languages, each with the usual file name, the code itself and a common run command. Look up several languages at once or list them all; the lookup runs entirely locally.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Use one language (aliases such as Golang or node also work), comma or line separated for several, or type all to list every one of the 37 entries. The snippets are text only and are never executed.
Snippets
Data follows the classic Hello World of each language; run commands are the common form and may differ slightly per toolchain version.
Enter a language to see its Hello World snippet
What this tool does
- Grab a runnable Hello World skeleton when starting with a new language, without hunting through docs for the file name
- Compare hello-world styles across languages when writing tutorials, slides or README files
- Type all to export snippets for 37 languages as a cheat sheet or teaching material
Example
Input
Python, Go
Output
Python(hello.py)
print("Hello, World!")
Go(main.go)
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}Separate several languages with commas or newlines — output keeps your order. Enabling "Append a common run command" adds one run line per snippet.
Frequently asked questions
How many languages are covered?
Thirty-seven: C, C++, C#, Java, Python, JavaScript, TypeScript, Go, Rust, Ruby, PHP, Swift, Kotlin, Scala, Perl, Lua, R, Dart, Elixir, Erlang, Haskell, Clojure, F#, Visual Basic, Bash, PowerShell, Batch, SQL, Fortran, Pascal, Nim, Crystal, Julia, Tcl, Scheme, Groovy and Octave (MATLAB compatible). Type all to list every entry.
Do the snippets run as-is?
They are the classic form of each language and normally run after you save them under the shown file name (Java requires the class name to match the file name, Batch only runs in the Windows command prompt, and Oracle needs FROM dual for the SQL example). The tool only looks up and formats text — it never executes code or touches the network.
Why does searching for "java" return both Java and JavaScript?
Lookup order is: exact language name, then aliases (js, golang, py, sh …), and only then substring matching. Substring search is intentional so keyword lookups still find something; type the full name Java if you want just that entry.
Do the run commands depend on toolchain versions?
Commands follow current mainstream toolchains: go run for Go, rustc for Rust, kotlinc for Kotlin, erlc + erl for Erlang. Older toolchains (GOPATH-era Go, Python 2 print statements) need adjustment, and a few entries (Scala, F#, Visual Basic) assume reasonably recent versions.
What about languages that are not covered?
Unknown names are not an error on their own: the result ends with a "not covered: xxx" line and a counter. Only when nothing matches at all does the tool report that the language is not covered. Adding a language means adding one record (name, aliases, file name, snippet, run command) to the data table.
Keywords:Hello Worldhello world snippet