README.md

July 9, 2025 ยท View on GitHub

This is a simple program that finds the Steam installation on disk, reads appinfo.vdf and packageinfo.vdf files and dumps appid/subid and their tokens.

This is mostly intended as an example on how to read these files.

appinfo.vdf

File Header

TypeSizeVersionField NameDescription
uint324MagicVersion identifier (see Version History)
uint324UniverseSteam universe (always 1)
int64841+String Table OffsetOffset to string table from file start

App Entry (Repeated)

TypeSizeVersionField NameDescription
uint324App IDSteam application ID
uint32436+SizeSize of data until end of binary VDF
uint324Info StateState flags (2 = normal, 1 = prerelease/no info)
uint324Last UpdatedUnix timestamp of last update
uint64838+PICS TokenProduct Info Change Set token
bytes2038+SHA-1 HashHash of text appinfo VDF
uint32436+Change NumberSteam change number
uint81<38Section TypeSection identifier (repeated until 0x08)
bytes2040+Binary SHA-1Hash of binary VDF data
bytesvariableBinary VDFVDF data in binary format

Repeated read until the first uint32 (App ID) is zero (which is the file footer).

String Table (Version 41+)

Located at the offset specified in the file header:

TypeSizeVersionField NameDescription
uint32441+String CountNumber of strings in table
null-terminatedvariable41+StringsArray of null-terminated strings

This string table is used to deduplicate strings in all the binary vdf blobs, so it is required to parse this string table first, and then parse the binary keyvalues with this string table.

Version History

VersionMagic NumberStart DateDescription
360x06564424circa 2011Added size field
370x07564425circa 2012Same structure as v36
380x07564426circa 2013Added PICS token and SHA hash
390x07564427circa 2017Same as v38 but unified VDF structure
400x07564428Dec 2022Added binary VDF SHA1 hash validation
410x07564429June 2024Added string table with offset pointer

For parsing older formats not implemented here, see this repo.

SHA-1 Hash Fields

The appinfo format includes two different hash fields that serve different purposes:

SHA-1 Hash

This field contains the SHA-1 hash of the raw CMsgClientPICSProductInfoResponse.AppInfo.buffer from Steam's internal protobuf protocol, excluding the last byte (which is always \x00). This hash is used by Steam for downloading appinfo from CDN via HTTP and corresponds to the hash provided when the Steam client requests appinfo from the server.

This hash cannot be easily recalculated from the VDF data alone, as it represents the hash of the original protobuf buffer that Steam received from the server, not a hash of the local VDF representation.

Binary SHA-1 Hash (20 bytes, version 40+)

This field contains the SHA-1 hash of the binary VDF data that follows immediately after this field. This hash can be calculated directly from the VDF data and is used to verify the integrity of the local binary VDF content.

packageinfo.vdf

File Header

TypeSizeVersionField NameDescription
uint44MagicVersion identifier (see Version History)
uint324UniverseSteam universe (always 1)

Package Entry (Repeated)

TypeSizeVersionField NameDescription
uint324Package IDSteam package/subscription ID
bytes20SHA-1 HashHash of package data
uint324Change NumberSteam change number
uint64840+PICS TokenProduct Info Change Set token
bytesvariableBinary VDFVDF data in binary format

Repeated read until the first uint32 (Package ID) is 0xFFFFFFFF (which is the file footer).

Version History

VersionMagic NumberStart DateDescription
390x06555627Before Apr 2020Basic format
400x06555628Apr 2020Added PICS Token field