Archive format

AR converter

An .ar file is a Unix `ar` archive — the oldest archive format still in everyday use, and about as simple as an archive can be: a seven-byte signature followed by 60-byte plain-text headers each introducing one member. Static libraries (.a) and Debian packages (.deb) are both ar archives.

Private for supported formats — processed in your browser

Convert supported files

Runs on your device

Drop AR files here

Batch files can each use a different output. Nothing uploads for local conversions.

Working inputs include camera RAW, browser-local audio/video, PDF, CBZ/CBR comics, office documents, ebooks, markup, 3D models, structured text, images, and archives.

Where AR comes from

ar was in the first edition of Unix in 1971, originally as a general-purpose archiver; tar took that role and ar retreated to holding compiled object files as static libraries. Debian picked it in 1995 as the outer container of .deb, on the grounds that a package should be openable by tools present on any Unix system even when dpkg is broken — an .ar containing three members, one of which is a tarball of the actual files. GNU and BSD then diverged on how to store names longer than fifteen characters, which is the format's one real incompatibility.

How AR works

  • The file begins with the eight-byte string `!<arch>` followed by a newline.
  • Each member header is exactly 60 bytes of space-padded ASCII: name, modification time, owner, group, mode, size, and the two-byte terminator 0x60 0x0A.
  • Members begin on even offsets, so an odd-sized member is followed by a single padding byte.
  • The name field is 16 bytes. BSD stores a longer name as `#1/<length>` with the real name prefixed to the data; GNU keeps a string table in a member named `//` and refers to it as `/<offset>`. A reader that handles only one sees garbled names from the other.
  • There is no compression and no checksum of any kind — the format predates both conventions.

When to use AR

  • Opening a Debian package's outer container without dpkg
  • Inspecting the members of a static library
  • Recovering files from a toolchain artefact
  • Converting an ar archive to ZIP or TAR for ordinary tools

Strengths and limitations

Strengths

  • Trivially simple and readable in a hex editor
  • Stable for fifty years and still the container beneath .deb and .a
  • Extractable with tools present on essentially any Unix system

Limitations

  • No compression at all, so archives are the sum of their members
  • The GNU and BSD long-name conventions are incompatible
  • No integrity checking whatsoever

Compatibility

GNU binutils `ar`, bsdtar, 7-Zip and libarchive all read it. Novus Convert opens .ar archives in the browser and writes ZIP, TAR or TAR.GZ. Nothing inside is interpreted: an object file or a package payload is copied as bytes, never linked, installed or executed.

The header's mode, ownership and timestamp fields are read; ZIP output preserves names and sizes.