Free Pascal Compiler
An open source cross-platform compiler generating fast, native machine Â
code across operating system or hardware architecture.
To quickly get a taste of object pascal, try our online playground.
What is Free Pascal?
Free Pascal is a free, open-source Object Pascal compiler (FPC) delivering fast, native code for multiple architectures and operating systems. It is highly compatible with Delphi and Turbo Pascal dialects. It allows developers to build robust, strongly-typed software that easily scales from lightweight embedded systems to complex desktop applications.
Key Features
➣ Generate optimized machine code with minimal memory usage and zero external dependencies.
➣ Bundled with core development tools, package managers, and a comprehensive standard library covering databases, networking, and native OS APIs.
➣ Write modern code using generics, operator overloading, custom attributes and much more.
Large Platform Support
➣ Support for many operating systems and architectures: platforms ranging from everyday consumer computers to small embedded devices and browsers.
➣ Write Once, Compile Anywhere: easily recompile the exact same codebase across multiple systems with zero runtime dependencies.
Pas2js Transpiler
➣ Pas2js translates structured Object Pascal source code directly into optimized, clean JavaScript.
➣ Full DOM access: provide native Pascal bindings to interact directly with the HTML DOM, browser APIs, and external JavaScript libraries.
➣ Smart linking optimization: generate exceptionally small, fast-loading JavaScript file sizes.
What is possible with Free Pascal?
Use FPC for a variety of software development purposes
Cross-Platform Apps
Build native applications for Windows, macOS, and Linux using visual development environments like Lazarus.
Business Tools
Create database-driven enterprise software, accounting tools, and inventory systems.
System Utilities
Write fast command-line tools or run Pascal files as native-speed scripts using InstantFPC.
Web Frontends
Transpile Object Pascal code directly into JavaScript using Pas2js for browser-based applications.
HTTP Servers
Build multi-threaded, lightweight web servers and REST APIs using native units like fphttpapp or advanced frameworks like mORMot.
Embedded and Consoles
Target niche or retro hardware including Nintendo Game Boy Advance, DS, and Wii, alongside modern ARM devices.
Drivers and Kernels
Write hardware-near code, mix inline assembly with Pascal, and handle direct memory pointers.
Video Games and 3D Apps
Develop 2D and 3D games using robust engines like the Castle Game Engine or ZenGL. It has bindings for industry-standard libraries like SDL2, OpenGL, Vulkan, and Raylib.
Mobile Apps
Support compiling for both Android and iOS. Allow you to share your core business logic across your desktop and mobile apps.