To compile a program is to convert it from human-readable source code into an executable file. Compiling a program also packages assets like images and icons into the program. It is necessary to compile a program before a computer can run it.

When a developer writes a program, they do so in a programming language designed to be easy for them to write, read, and maintain. However, computers cannot run a program directly from source code — the CPU can only understand instructions in its native, low-level machine language. Compiling a program converts the instructions in the source code into a corresponding set of instructions in machine language, then encodes it into a binary executable file.

Compiling a program translates source code files into an executable file
Compiling a program translates source code files into an executable file

Software development kits (SDKs) include programs called compilers for developers to compile their projects. A compiler converts source code into an executable file for a single operating system and processor architecture at a time — for example, Windows on x86-64 or Unix on ARM64. Some compilers allow a developer to include machine code for multiple architectures in a single file — for example, a universal binary for macOS that can run on both Intel and Apple Silicon processors — by separately compiling for each processor architecture, then combining them into a single packaged executable.

NOTE: Programming languages that don't require compiling before running are known as "interpreted" languages. Instead, an "interpreter" program translates a program's source code into machine language at runtime. For example, a JavaScript program is not compiled but instead runs through a separate JavaScript interpreter.

Updated March 31, 2023 by Brian P.

quizTest Your Knowledge

What is another name for a database record?

Correct! Incorrect!     View the Record definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Compile on this page is an original definition written by the team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.