.A

A File

Unix/Linux Static Library (ar archive)
Ask a question
QUICK ANSWER

A .a file is a static library used on Unix, Linux, and macOS. It is an ar-format archive of compiled object files that the linker copies into your program at build time. You do not open it like a document - inspect it with "ar t lib.a" (list members) or "nm lib.a" (list symbols). A small number of Ada compilers also use .a for source code; if the file is plain text, that is the case.

Developer: Unix lineage (ar archiver); GNU binutils on Linux Category: Developer Files Open standard MIME: application/x-archive
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Sep 10, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the A file format?

.a files contain system libraries used by software developers. Such files are commonly found on Unix-like systems - including Linux and macOS - while Microsoft Windows systems use .LIB files for the same purpose. .a files provide compiled functions and headers that can be referenced by source files. Libraries with a .a extension are commonly referred to as static libraries.

A .a file is technically an ar-format archive: a container holding one or more compiled object (.o) files. On Linux the members are ELF-format .o files; on macOS they are Mach-O objects. Every .a archive begins with the 8-byte ASCII signature !<arch> followed by a newline, making it recognizable by file-inspection tools. You can list archive contents with ar t libname.a and inspect exported symbols with nm libname.a.

Computer programs use two types of resource libraries: static libraries and dynamic libraries. Static libraries (.lib or .a) are typically larger than dynamic ones because their code is compiled directly into the target program at link time. Dynamic libraries - .SO files on Linux, .dylib on macOS - are connected to a given program upon its execution or in the middle of program execution. Program developers can customize their code to work with various dynamically-linked libraries.

The ar utility (part of GNU Binutils on Linux) is the standard tool for creating and maintaining .a archives. Because the linker extracts only the object files it needs, unused code from a static library is not included in the final executable.

Security & safety

RISK: LOW

A .a is build-time data, not something the OS runs, so it poses little direct risk to end users. For developers the concern is supply-chain trust: a malicious or tampered static library links its code straight into your program, so use .a files only from trusted SDK sources and verify checksums/signatures. An Ada-source .a is plain text and harmless to open.

Format details

in a nutshell
FULL NAMEUnix/Linux Static Library (ar archive)
DEVELOPERUnix lineage (ar archiver); GNU binutils on Linuxsince ar archive format from early Unix (1970s); standard static-library extension on Unix/Linux/macOS
MIME TYPEapplication/x-archive
TYPEar-format archive of compiled object files (ELF/Mach-O .o members)
STANDARDOpen · royalty-free
This extension is also used by…
  • Ada source code file - Some Ada compilers/projects use .a (and .ada/.adb/.ads) for plain-text Ada source - this is the meaning the legacy DB recorded, but it is far less common than the static library.
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304050607
HEX
213C617263683E0A
ASCII
!<arch>·
A .a static library is an ar-format archive and begins with the 8-byte signature "!<arch>\n" (21 3C 61 72 63 68 3E 0A). Its members are compiled object files (ELF .o on Linux, Mach-O on macOS). This is the same archive family as a Windows .lib. (An Ada source file, the other meaning of '.a', is plain text with no signature.)

Programs that open A files

Windows2 apps
Microsoft Visual Studio Freemium VS uses .lib, not Unix .a. Useful only if the .a is Ada source (edit as text) or via WSL/MinGW for cross builds - not a native opener.
7-Zip Open-source Open the .a as an archive to browse/extract its object members (it's an ar archive). Building against it needs a matching toolchain (MinGW/WSL).
macOS2 apps
ar / nm (Xcode command line tools) Free Same toolchain: 'ar t lib.a' / 'nm lib.a'. Members are Mach-O objects. Install with 'xcode-select --install'.
BBEdit / TextEdit Freemium Only for Ada-source .a files (also_used_by) - open as plain text. A binary static library will look like garbage.
Linux3 apps
binutils (ar / nm / objdump) Open-source 'ar t libfoo.a' lists members; 'nm libfoo.a' lists symbols; 'ar x libfoo.a' extracts the .o files. A .a is linked, not opened.
GCC / Clang (linker) Open-source Link against it during a build: 'gcc main.c -L. -lfoo' pulls libfoo.a into the executable.
GVim / any text editor Open-source Only if the .a is actually Ada SOURCE text (the also_used_by meaning) - then edit it like any source file.

Technical details

deep spec
File signature"!<arch>\n" (hex: 21 3C 61 72 63 68 3E 0A) at byte offset 0
Archive formatar (Unix Archiver) - same container format across Linux, macOS, and BSD systems
MIME typeapplication/x-archive
Member file type (Linux)ELF relocatable object files (.o)
Member file type (macOS)Mach-O relocatable object files (.o)
Per-member header size60 bytes - ASCII fields: name (16 B), timestamp (12 B), UID (6 B), GID (6 B), mode (8 B), size (10 B), end marker (2 B)
Symbol index memberGNU ar uses a member named "/"; BSD/macOS ar uses "__SYMDEF" - maps symbol names to member offsets for fast linking
Naming conventionlib<name>.a - e.g., libz.a, libssl.a, libpthread.a; the "lib" prefix is required by the linker's -l flag
CompressionNone - member object files are stored verbatim, uncompressed
Link-time behaviourLinker extracts only the .o members that satisfy unresolved symbols; unused members are not included in the output executable
Standard creation toolar (GNU Binutils on Linux; LLVM ar / BSD ar on macOS); invoked as: ar rcs libname.a file1.o file2.o
Symbol inspection toolnm - lists exported, undefined, and local symbols; e.g., nm libname.a
Content inspection toolar t libname.a lists members; ar x libname.a extracts them; objdump / otool disassembles member code
Windows equivalent.lib static library (COFF/PE format); Windows cross-compilers such as MinGW also produce .a files
Typical file size rangeVaries from a few KB (small utility library) to hundreds of MB (e.g., libclang_rt.a or a full libc.a)
Releasedar archive format from early Unix (1970s); standard static-library extension on Unix/Linux/macOS
Open standardYes · royalty-free
Specificationen.wikipedia.org

A conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with A files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about A files.

Frequently asked questions

What is a .a file?
On Linux/macOS it's a static library - an 'archive' (ar format) of compiled object files that the linker copies into your program at build time. The Windows equivalent is .lib. (A few Ada compilers also use .a for source code.)
How do I open a .a file?
You don't open it like a document - the linker uses it during a build. To inspect it, run 'ar t lib.a' to list members and 'nm lib.a' to list symbols. If the .a is actually Ada source, open it in a text editor.
What's the difference between .a and .so?
A static library (.a) is baked into your executable at build time, so there's no run-time dependency. A shared library (.so on Linux, .dylib on macOS) is loaded separately at run time and shared between programs.
Is a .a the same as a Windows .lib?
They share the ar archive format but hold different object types (ELF/Mach-O vs COFF), so they aren't interchangeable. You can't use a Linux .a on Windows by renaming it - rebuild from source for the target platform.
How do I extract the .o files from a .a?
Run 'ar x libfoo.a' (binutils) to extract its object members, or open the .a in 7-Zip since it's an ar archive.
My .a file is text, not a library - why?
Then it's the other meaning of .a: Ada source code. Some Ada compilers use .a (along with .ada/.adb/.ads). Open it in any text editor or compile it with a GNAT/Ada toolchain.

References

1Wikipedia - ar (Unix) archive formaten.wikipedia.org
2GNU binutils - ar documentationsourceware.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data file

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z