XCODX |

V Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About V

V is a young compiled language, created by Alexander Medvednikov in 2019, that chases two goals relentlessly: near-instant compilation and code simple enough that there is usually one obvious way to write it. It borrows Go's readability, adds default immutability, option/result error handling, and no null, and compiles to native binaries or C. The most ambitious V showcase is Vinix, an operating system kernel written in the language, alongside the Vlang UI and web frameworks maintained in its 0.4.x releases. Because V evolves quickly, running code beats reading changelogs, and this page executes your V program in a real browser terminal where os.input pauses for the text you type.

Hello World in V

import os

fn greet(name string) string {
    return 'Hello, ${name}! Welcome to V.'
}

fn main() {
    name := os.input('Enter your name: ')
    println(greet(name))

    answer := os.input('Favorite number? ')
    num := answer.int()
    println('${num} doubled is ${num * 2}')

    mut total := 0
    for i in 1 .. 6 {
        total += i
    }
    println('Sum of 1..5 is ${total}')
}

When to use V

V attracts developers curious about minimal, fast-compiling alternatives to Go and C: CLI utilities, small web services with vweb, and experiments in OS development inspired by the Vinix kernel. Its enforced immutability-by-default and mandatory error handling make it a useful classroom prop for discussing language design tradeoffs. Hobbyists port small Go or Python scripts to compare binary size and startup time, and contributors following V's active development cycle verify how recent 0.4.x compiler changes affect syntax before updating their own projects.

Common questions

How do I read user input in V on this page?

Use os.input('your prompt: '), which prints the prompt and blocks until you type a line in the interactive terminal below your code. The returned string can be converted with .int() or .f64() for numbers. Since the terminal is live, chained prompts work in sequence just like a native console app.

Is V stable enough to learn in 2025?

V is still pre-1.0, in its 0.4.x series, and the team does make breaking changes between releases. The core syntax has been steady for a while, so it is fine for learning and side projects, but expect occasional migrations if you maintain long-lived V code, and treat older tutorials with some skepticism.

Can I use v install or third-party modules here?

No, package installation is disabled because runs are sandboxed without network access, and only a single file compiles per run. V's built-in vlib covers os, strings, math, json, time, and random out of the box, so typical exercises, benchmarks, and language-exploration snippets run without needing anything external.

How V runs on XCODX

Sandbox filename
main.v
Entry point
single main source file
Editor grammar
go
Reading stdin
os.input()
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

fn main() {
    println('Hello from V!')
    println('Welcome to XCODX Online Compiler!')
}