# Common Language Runtime (CLR)

> The .NET runtime. It runs C#, F# and Visual Basic code as one kind of code.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** CLR, .NET Runtime, Managed Code Runtime

## Think of it like

It is like a helper at a big meeting. People speak in many ways, and she puts it all in one.

## Definition

The Common Language Runtime, or CLR, is the runtime that runs .NET programs. Tools for C#, F# and Visual Basic turn code into an in-between code called CIL. When the program runs, the CLR turns CIL into machine code, just in time. It also cleans up memory with garbage collection. Code run this way is called managed code.

## Example

A team writes one part of an app in C# and one in F#. Both compile to CIL, and the CLR runs them as one program.

## Example code

```console
$ dotnet new console -o Hello
$ dotnet run --project Hello
Hello, World!
```

The dotnet tool builds a C# app, and the CLR runs it.

## Why it matters

It is the engine under each .NET app, from websites to Windows tools. It is also how .NET languages work together.

## Common mistake

Mixing up the CLR and C#. C# is a language; the CLR is the runtime that runs what it compiles to.

## Three principles

- **Runs CIL.** The code .NET languages compile to.
- **Many languages.** C#, F# and Visual Basic share it.
- **Managed code.** It handles memory for you.

## Related terms

- [Runtime Environment](https://learn.benibix.com/term/development/runtime-environment)
- [C#](https://learn.benibix.com/term/development/c-sharp)
- [Bytecode](https://learn.benibix.com/term/development/bytecode)
- [Just-in-Time Compilation (JIT)](https://learn.benibix.com/term/development/just-in-time-compilation)
- [Garbage Collection](https://learn.benibix.com/term/development/garbage-collection)
- [Java Virtual Machine (JVM)](https://learn.benibix.com/term/development/java-virtual-machine)

## Told apart from

- [JVM vs CLR](https://learn.benibix.com/compare/jvm-vs-clr): Both run code that was first turned into an in-between form. The JVM runs bytecode made from Java and Kotlin. The CLR runs CIL made from C# and F#.

![Source code splits into two paths. On the top path, a compiler turns C code into an executable file of machine code, which the operating system runs straight away. On the bottom path, a compiler turns Java or C# code into bytecode, and a runtime, the JVM or the CLR, turns that into machine code while the program runs.](https://learn.benibix.com/diagrams/dev7-runtimes.svg)

---

Source: https://learn.benibix.com/term/development/common-language-runtime
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
