Online C++ Compiler — Numio
Compile and run C++20 code online with Clang in your browser. iostream, STL, cin input and clear compile errors. Free, no sign-up, nothing uploaded.
Runs in your browser · No sign-up
Code (C++)
Ctrl/⌘ + Enter to run
input() and io.read() read these lines in order.
Output
Code runs locally in your browser; it is not uploaded.
How to use
- Write or paste C++ code with a main function.
- Optional: type input for std::cin in the input box.
- Press Run (or Ctrl/⌘ + Enter) to compile and run.
Example
// C++ example
#include <algorithm>
#include <iostream>
#include <vector>
int main() {
std::vector<int> nums = {3, 1, 4, 1, 5, 9};
std::sort(nums.begin(), nums.end());
std::cout << "Sorted:";
for (int n : nums) {
std::cout << ' ' << n;
}
std::cout << "\nMax: " << *std::max_element(nums.begin(), nums.end()) << '\n';
return 0;
}
Details and limitations
Code is compiled to a WebAssembly (WASI) program by Clang, itself running as WebAssembly. The toolchain (about 25 MB) downloads on first use and is cached afterwards.
Compiling C++ usually takes several seconds and does not count toward the 10-second run limit. Programs are 32-bit, threads are not available and exceptions are not supported.
FAQ
Which C++ standard is supported?
C++20, including iostream, std::string and STL containers and algorithms such as vector, map and sort.
How do I read input with cin?
Type values in the input box, separated by spaces or new lines. std::cin reads them in order.
Is my code uploaded to a server?
No. Your code is compiled and run entirely in your browser. Only the compiler is downloaded from a public CDN (jsDelivr) on first use.
Related tools
Format references
Tool page updated: