What is the ADS file format?
An .ads file is an Ada package specification - the interface half of an Ada package. Under the GNAT compiler naming convention (the de-facto standard across the Ada ecosystem), every Ada package is split across two files: the specification in .ads and the implementation body in an .adb file.
The .ads file declares what is publicly visible to other compilation units: types, subtypes, constants, subprogram signatures (procedure and function profiles), task types, and generic parameters. It contains no executable code or subprogram bodies - only the declarations that form the contract other packages depend on.
Syntactically, a specification opens with package <Name> is and closes with end <Name>;. Context clauses (with and use statements) at the top list the packages the spec depends on. Ada comments begin with --.
The format is plain UTF-8 (or ASCII) text with MIME type text/x-ada. There are no magic bytes; files are identified by their Ada source structure. The Ada dialect in use - Ada 83, 95, 2005, 2012, or Ada 2022 (ISO/IEC 8652:2023) - is controlled by GNAT compiler flags such as -gnat2022 or a source-level pragma Ada_2022.
.ads files are opened in GNAT Studio, Visual Studio Code with the Ada/SPARK extension, or any plain-text editor. The GNAT toolchain compiles them alongside their .adb bodies; build coordination is handled by a .gpr project file.
Security & safety
RISK: LOWAn .ads file is plain Ada source text and cannot run by itself, so opening one to read it is safe. The normal caution for any source code applies: review code from untrusted sources before compiling and running it, since the surrounding project will produce an executable. There is no DRM, encryption or special handling - treat it like any text/code file. Install the GNAT toolchain only from official sources (AdaCore/GCC).
Format details
in a nutshell- Advertising / ad-serving file - Some ad systems and AdSense-related tooling use .ads for ad-content or ad-tag files; unrelated to Ada source.
- Generic 'address book' / settings export - A few legacy programs save settings or address data with an .ads extension; identify by the originating application.
Programs that open ADS files
Technical details
deep spec| File type | Plain-text Ada source - the specification (interface) half of an Ada package |
| MIME type | text/x-ada (also accepted as text/plain) |
| Text encoding | UTF-8 or ASCII; Latin-1 historically; GNAT encoding selectable via -gnatiX flag |
| Binary signature | None - plain text; identified by Ada keyword structure (package <Name> is … end <Name>;) |
| Typical file size | 1 KB - 100 KB (spec-only declarations; bodies live in the companion .adb) |
| GNAT naming rule | Base name must match the package name, lowercased with dots replaced by dashes - e.g., Ada.Containers maps to ada-containers.ads |
| Structure | Optional with/use context clauses, then package <Name> is, public declarations, optional private section, end <Name>; |
| Content constraint | Declarations only - types, subtypes, constants, subprogram profiles, generics; no executable code or bodies |
| Visibility model | Public part visible to all dependent packages; private section accessible only within the package and its children |
| Language dialect | Ada 83 / 95 / 2005 / 2012 / 2022 selected via GNAT -gnatXX flags or pragma Ada_XXXX in source |
| Compiled output | GNAT produces a .ali (Ada Library Information) file and object file (.o) for each compiled .ads/.adb pair |
| Build coordination | GNAT Project file (.gpr) lists .ads sources and controls per-unit compilation switches |
| Platform support | Cross-platform: Linux, Windows, macOS, and embedded targets (VxWorks, RTEMS, bare-metal ARM, RISC-V) |
| Compiler ecosystem | GNAT (GCC Ada front-end, AdaCore), GNAT LLVM, PTC ObjectAda, Green Hills MULTI Ada |
| Released | 1980 (Ada language); .ads/.adb naming from GNAT (early 1990s) |
| Latest version | Ada 2022 (ISO/IEC 8652:2023) |
| Open standard | Yes · royalty-free |
| Specification | www.adaic.org |
ADS conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about ADS files.