Hello, World!
fn main() {
println('Hello, World!')
}Tap Run to execute
main.v · output appears here
Press Run to execute
Output streams here as your program runs.
V (also called Vlang) is a statically typed, compiled programming language created by Alexander Medvednikov, with its first public release in 2019. It is designed for simplicity, fast compilation, and safety, with a syntax similar to Go. V emphasizes no global state by default, immutability by default, no null, and minimal runtime, aiming to make it easy to write maintainable and predictable software.
On CompileBytes, V programs are built with the V compiler reported as version 0.3.3. V compiles to native machine code (via C as an intermediate target) and produces small, dependency-free binaries with very fast build times. It is used for systems programming, command-line tools, and web backends, and includes built-in features such as a formatter, testing, and optional memory management modes including an autofree allocator.
main.v 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.
fn main() {
println('Hello, World!')
}fn square(n int) int {
return n * n
}
fn main() {
println(square(5))
}fn main() {
for i in 1 .. 6 {
println('Count: ${i}')
}
}fn main() {
nums := [1, 2, 3, 4, 5]
mut sum := 0
for n in nums {
sum += n
}
println('Sum: ${sum}')
}struct Point {
x int
y int
}
fn main() {
p := Point{x: 3, y: 4}
println('Point(${p.x}, ${p.y})')
}fn main() {
n := 2
s := match n {
1 { 'one' }
2 { 'two' }
else { 'many' }
}
println(s)
}fn main() {
mut ages := map[string]int{}
ages['Ada'] = 36
ages['Tom'] = 42
for name, age in ages {
println('${name}: ${age}')
}
}fn factorial(n int) int {
if n <= 1 {
return 1
}
return n * factorial(n - 1)
}
fn main() {
println(factorial(6))
}import os
fn main() {
name := os.input('Enter your name: ')
println('Hello, ${name}!')
}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
V is one of 46 single-file compiler scratchpads. Each run submits only main.v; 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 V source file.