Footprint Library File Format

Introduction

This documents the s-expression footprint library file format for all versions of KiCad from 6.0.

  • Footprint library files use the .kicad_mod extension.

  • Footprint library files can only define a single footprint.

  • Footprint libraries are defined a folder containing one or more footprint library files.

This file format was introduced with the launch of KiCad 4.0.
Prior to version 6 of KiCad, strings were only quoted when necessary. Saving an older board file to the latest file format will result in these strings being quoted even though there is no functional change in the board itself.

Layout

A footprint library file includes the following sections:

Header Section

The footprint token indicates that it is KiCad footprint library file. This section is required.

Third party scripts should not use pcbnew as the generator identifier. Please use some other identifier so that bugs introduced by third party generators are not confused with a footprint library file created by KiCad.
(footprint "NAME"                                               (1)
  (version VERSION)                                             (2)
  (generator GENERATOR)                                         (3)

  ;; contents of the footprint library file...                  (4)
)
1 The footprint NAME is a quoted string that defines the name of the footprint.
2 The version token attribute defines the board version using the YYYYMMDD date format.
3 The generator token attribute defines the program used to write the file.
4 The footprint definition goes here.

Footprint Section

See the footprint in the s-expression board common definitions.