Online compiler, debugger and visualizer
Test your code with test cases
Like a coding judge, but for your own code. Add inputs with the output you expect, press Run all, and see which tests pass, which fail and the first line that differs.
- Free
- No sign-up
- Real compilers
- Works on phones
#include <iostream>#include <vector>#include <algorithm>using namespace std; int main() { int n; cin >> n; vector<int> v(n); for (auto &x : v) cin >> x; sort(v.begin(), v.end()); for (int x : v) cout << x << ' '; cout << endl;}What you can do
Any program
Tests work with the code you write, not only with prepared problems.
Line-by-line differences
A failing test shows your output and the expected output side by side, with the first difference marked.
Fixed values detected
If your code ignores the input (hard-coded values), you are told and can switch it to read input in one click.
Run from your last run
Turn the input and output of a run into a test with one click.
Shared in live sessions
When you code together, tests and their results are shared too.
How it works
- 1
Open the editor and write your program.
- 2
Open Tests and add inputs with expected outputs.
- 3
Press Run all and fix what fails.
Questions and answers
Are trailing spaces compared?
No. Trailing spaces and blank lines at the end are ignored, like most judges.
Is it free?
Yes. Running, debugging, tests and live sessions are free, with no sign-up.
Where are my projects saved?
In your browser, on your device, automatically as you type. Nothing is lost when you close the tab. They stay until you delete them.
Is my code safe to run?
Every program runs in its own isolated sandbox with no internet access and strict limits on time, memory and processes, and is deleted when it finishes.