What is a .pas file?
Pascal / Delphi Source File · Code and data · Niklaus Wirth; Borland/Embarcadero (Delphi) · 1970
A .pas file is Pascal source code, the teaching language of the 1970s and 80s that lives on today mainly as Delphi and Free Pascal. Plenty of Windows business software is still built from .pas files.
What is a .pas file used for?
Pascal was designed by Niklaus Wirth to teach structured programming, and for years it was the standard first language. Borland's Turbo Pascal and then Delphi turned it into a serious application language for DOS and Windows.
Modern .pas files are usually Object Pascal, written for Delphi or the open-source Free Pascal compiler with the Lazarus IDE. The files are plain text.
What opens a .pas file?
The .pas format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Delphi
- Lazarus (Free Pascal)
- any text editor
macOS
- Lazarus (Free Pascal)
- VS Code
- any text editor
Linux
- Lazarus (Free Pascal)
- VS Code
- any text editor
Open a .pas file step by step
- Confirm the file really is a .pas. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Delphi or Lazarus (Free Pascal).
- On Mac, use Lazarus (Free Pascal) or VS Code.
- On Linux, try Lazarus (Free Pascal) or VS Code.
- Still stuck? Convert the .pas to exe (compiled), which opens more widely.
Why can't I open my .pas file?
Almost always because no installed app understands Pascal. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .pas at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .pas file
You can convert a .pas file to exe (compiled) using a conversion tool or the export menu of an app that opens it.
Pascal has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .pas file?
A .pas file is Pascal source code, the teaching language of the 1970s and 80s that lives on today mainly as Delphi and Free Pascal. Plenty of Windows business software is still built from .pas files.
How do I open a .pas file?
Any text editor shows the source. To compile it, use Free Pascal (with the Lazarus IDE) or Delphi, depending on which dialect the code targets.
Is Pascal still used?
Yes. Delphi remains common in business and industrial Windows software, and Free Pascal with Lazarus keeps the language alive cross-platform and open source.
What is the difference between .pas and .pp?
Both are Pascal source. .pp is a convention some Free Pascal code uses to mark units written for that compiler, while .pas is the universal extension.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.