What is Compiler Explorer?
Updated
Compiler Explorer is a browser-based interactive compiler that shows the assembly output of your code as you type. You paste or write source code in one pane, pick a compiler and language, and the site compiles it server-side and displays the generated assembly (or other intermediate output) in a second pane. It supports C++, Rust, Go, and many other languages, and it requires no local installation — but it does need JavaScript, since the regular site is not functional without it.
What you can do with it
The core workflow is a two-pane editor: source on the left, compiler output on the right. From there, the tool exposes a wide range of views and options.
Core actions
- Write or paste code in the source editor and see compiled output update live.
- Choose from multiple compilers and language versions via the compiler selector.
- Switch the output view to assembly, binary object, or execute the code directly.
- Compare two versions of code side by side using the Diff View.
- Use Tree (IDE Mode) for a structured view of the compilation.
Output and analysis views
Beyond raw assembly, Compiler Explorer can show several intermediate representations and diagnostics, depending on the language and compiler:
| View | What it shows |
|---|---|
| Preprocessor | Preprocessed source |
| AST | Abstract syntax tree |
| LLVM IR / ClangIR | LLVM intermediate representation stages |
| Opt Pipeline | Optimization pass pipeline |
| GCC Tree/RTL, GIMPLE | GCC internal representations |
| Rust MIR / HIR / Macro Expansion | Rust compilation stages |
| GHC Core / STG / Cmm | Haskell compilation stages |
| Control Flow Graph | Graph of program control flow |
| Device | Device-side output for GPU targets |
The available views depend on the selected language and compiler — the site notes when the current language or compiler does not support a given tool.
Practical features
- Compiler flags: edit verbose compiler flags in a separate window, and use "Popular arguments" for common options.
- Libraries: add and manage libraries, with overrides.
- Execution: run compiled code and supply stdin and runtime arguments.
- Formatting: apply clang-format to your source.
- Sharing: generate a short link, full link, or an embeddable iframe.
- Save/Load and History: keep and revisit your work.
- Templates: start from a template rather than a blank editor.
- UI layout: reset the UI layout or reset both code and UI layout.
Output filtering and display options
The output pane has filters that matter when assembly gets noisy:
- Demangle identifiers (and verbose demangling).
- Intel asm syntax toggle.
- Filter unused labels, library functions, directives, comments, and horizontal whitespace.
- Show or hide debug intrinsics.
- Wrap lines.
- Download the output.
For optimization remarks, you can choose to show missed, passed, or analysis remarks. For LLVM IR, options include dumping the full module, demangling symbols, and -fno-discard-value-names.
Who it is for
- Learners who want to see what their C++, Rust, or Go code compiles to without setting up a toolchain.
- Developers comparing how different compilers or optimization levels handle the same code.
- Anyone debugging code generation, inlining, or optimization behavior.
Things to know before you start
- JavaScript is required for the regular site. A noscript version exists if you cannot use JavaScript.
- The site is funded through sponsorships and donations (Patreon, GitHub Sponsors, PayPal, and a shop); the page evidence does not state pricing or login requirements, so treat availability of any account-based features as unconfirmed.
- Some tools are language- or compiler-specific and will be unavailable for certain selections.
If you want to see assembly for a snippet right now, open the site, pick your language and compiler, paste the code, and read the output pane — that is the entire loop.