Online compilers can be useful tools to quickly compile a snippet of code without having to install a proper compiler on our computer. They can be especially useful to play with the newest language features, to share code snippets online or to compare different compilers.
The following list provides information about available online compilers and their most important features. Support for other languages than C++ is available on many of the listed websites but not covered here. Depending on the versions of the compilers used, they support different versions of the C++ standard. See this page for more detailed feature lists.
Besides mere compilation, most online compilers also execute the compiled program. The possibilities to parametrize the compilation via compiler flags, to pass command line/runtime parameters to the executed program and to provide input for standard input vary between the different compilers.
- Table of Contents {:toc}
Name | Number Compilers | C++ Version | Boost Version | Execution | Distinguishing Features | Other Languages |
---|---|---|---|---|---|---|
Compiler Explorer (Godbolt) | 60+ | C++17 | 1.64 | ✔️ | compile to assembly and execute as you type, on multiple compilers | ✔️ |
Codiva.io | 1 | C++17 | 1.65 | ✔️ | Clang, user input, multiple files, continuous compilation every few keystrokes, sharing and embeding in blogs | ✔️ |
paiza.IO | 1 | C++14 | ✔️ | multiple files, collaborative live editing, full screen editor, Internet connection, GitHub(gist) integration | ✔️ | |
Wandbox | 35 | C++17 | 1.64 | ✔️ | multiple files | ✔️ |
Coliru | 2 | C++17 | 1.63 (header only) | ✔️ | GCC & Clang, freely editable shell command line | |
Quick-Bench | 1 | C++17 | only benchmarks | benchmarks functions against each other | ||
Cppinsights | 1 | C++17 | compile to a more verbose code that tells what the compiler does under the hood | |||
Rextester | 3 | C++14 | 1.58 (header only) | ✔️ | GCC, Clang, MSVC, collaborative live editing features | ✔️ |
Ideone | 1 | C++14 | 1.62 (header only) | ✔️ | GCC | ✔️ |
C++ Shell | 1 | C++11-14 | 1.55 (header only) | ✔️ | GCC, interactive Stdin | |
repl.it | 1 | C++17 | ✔️ | GCC, interactive Stdin | ✔️ | |
Tutorialspoint CodingGround | 1 | C++11 | ✔️ | multiple files like proper IDE, GCC but sluggish web app |
||
Geeksforgeeks | 1 | C++14 | 1.58 | ✔️ | GCC, full screen editor | ✔️ |
Codepad | 1 | C++03 | 1.34 | ✔️ | GCC | ✔️ |
TIO - Try It Online | 1 | C++14 | ✔️ | Easy sharing, split source in header, source and footer | ✔️ | |
Codechef | 1 | C++14 | 1.62 | ✔️ | Potential support for multiple tabs ("online IDE") and file upload | ✔️ |
JDoodle | 3 | C++14 | ✔️ | collaborate with friends | ✔️ |
Codiva.io is an online compiler and IDE that allows to edit, compile, execute and share multiple C++ files. As a distinguishing feature, it compiles the code every few keystrokes, and highlights the error lines in the editor itself saving time. It even works on mobile.
paiza.IO is a full screen online IDE that allows to edit, compile, execute and share multiple C++ files. As a distinguishing feature, it allows live editing, multiple file editing, Internet connection, and GitHub(gist) integration.
Wandbox provides pretty much all of the functionality you'd want from a typical online compiler, including support for multiple files and different editor keybindings. Besides the standard library, it features a few libraries including Boost (up to 1.64), Sprout and MessagePack. The compiled programs run in a sandbox environment that allows file I/O. The snapshot versions of GCC and Clang that are provided make it possible to play with the latest C++17 features.
Compiler Explorer is a compile-as-you-type IDE with a unique feature as it presents the assembly produced by the compilers. The resulting assembler can be color-mapped to the originating C++ code. It supports the use of different sources and multiple compilers at the same time, so we can compare the assembly produced by different code and/or different compilers, optimization flags, etc. Compiler Explorer can be found on GitHub and can be used locally. Execution is currently restricted to compilers running on x86_64 Linux, i.e. MSVC and ARM compilers do not support execution.
Coliru provides an editor and a freely editable Linux shell command line, which makes it relatively powerful. For example, you can compare the outputs of both Clang and GCC by issuing the commands for compilation and execution for both compilers. Editing of multiple files at once is not supported, but since the code you share is saved in an archive you can use that to prepare multiple files (see the FAQ for an example). It is also possible to download e.g. a Gist via curl
before the compilation.
Coliru provides a public API, so it can, for example, be integrated into websites cppreference.com, which uses Coliru for its runnable examples.
Quick-Bench is specialized for benchmarking snippets of C++ code. It relies on Google Benchmark and, instead of showing your code's console output, it shows how fast it executed compared to an empty function.
Cppinsights is not so much an online IDE in the traditional sense as it does not allow to execute compiled programs. Instead, it shows a different version of the code that shows some of the magic the compiler does under the hood.
Rextester is a standard online IDE that allows to edit, compile, execute and share single C++ files. As a distinguishing feature, it allows creating live editing sessions so that multiple people can edit the same source simultaneously and see each other's edits in real time.
Ideone is a standard online IDE that allows to edit, compile, execute and share single C++ files.
Another single file compilation IDE, but with the rare feature of interactive stdin input. The web application seems to hang sometimes during compilation or execution.
A single file compilation IDE, but comes with a shell-like interactive stdin input. Users that have logged in can save multiple named sessions (but no multi-file compilation). While the prompt says something about gcc 4.6.3, it uses gcc 7.1.0.
An online IDE with multiple files. The whole web application seems to be sluggish at times, I could not register to try out the features that require an account login like saving or uploading whole projects (broken link/unresponsive web app).
Geeksforgeeks is a classic online compiler for several languages. Notable features are a full screen mode for the editor and "Copy" buttons on every textbox (editor, stdin, stdout, sharing link) that put the content in the clipboard.
TIO has a slightly unusual interface but elsewise provides any functionality you'd expect from an online compiler. A notable feature is that you can split your code into a header, a footer and a main source, e.g. to get includes and boilerplate out of the focus of the reader. Another is that TIO preformats sharing links for various targets, e.g. http links, Wiki links, BBCode links and even a full post for Codegolf StackExchange. The post will contain only the main source but not the header and footer code.
Codepad can be unintuitive - pasting new code at the URL of previously pasted code will return to the original code. The code will be compiled and executed as-is without any possibility to further parametrize it.
Codechef seems to aim at the users of a "non-commercial competitive programming community". When I tested the compiler, the compilation seemed to be rather slow. Distinguishing feature: the tool allows do download the editor's content to a file. Opening a new IDE tab resulted in an infinite loading animation, the button to upload a file into the editor did not work at all.
JDoodle besides having three GCC versions to choose from, the most obvious feature of JDoodle is the collaboration support via TogetherJS which allows you to invite a friend to view and work on the same screen. Apart from that and the option to provide runtime input for your program, JDoodle provides the possibility to save your code snippets (after creating an account for free).