Hello, World!
PRINT "Hello, World!"Tap Run to execute
main.bas · output appears here
Press Run to execute
Output streams here as your program runs.
BASIC (Beginner's All-purpose Symbolic Instruction Code) is a family of high-level languages originally designed by John Kemeny and Thomas Kurtz at Dartmouth College in 1964. It was created to make programming accessible to students and beginners, with simple, English-like statements. BASIC became hugely popular on early home computers, where many people wrote their first programs using line numbers, PRINT statements, and GOTO.
On CompileBytes, BASIC is executed by an interpreter reported as version 1.9.0. This dialect supports the classic, approachable style of BASIC: straightforward PRINT and INPUT for I/O, simple variables, FOR/NEXT loops, and conditional logic. BASIC remains a friendly way to learn fundamental programming concepts such as variables, loops, and branching without the ceremony of more complex languages, and it is well suited to short scripts and quick experiments.
main.bas is the entry point for each run.
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.
PRINT "Hello, World!"LET A = 10
LET B = 20
PRINT "Sum is "; A + BFOR I = 1 TO 5
PRINT "Count: "; I
NEXT IINPUT "Enter your name: "; N$
PRINT "Hello, "; N$LET X = 7
IF X > 5 THEN
PRINT "Big"
ELSE
PRINT "Small"
END IFLET I = 1
WHILE I <= 5
PRINT I
LET I = I + 1
WENDLET TOTAL = 0
FOR I = 1 TO 10
LET TOTAL = TOTAL + I
NEXT I
PRINT "Total: "; TOTALFOR I = 10 TO 0 STEP -2
PRINT I
NEXT ILET A$ = "Hello, "
LET B$ = "World!"
PRINT A$ + B$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
BASIC is one of 46 single-file compiler scratchpads. Each run submits only main.bas; local sibling-file imports are not enabled.
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.
Download file exports the active BASIC source file.