Anyone who has wired up a 64-pin STM32, an RP2040, or a high-density board-to-board connector in KiCad knows the most mind-numbing part of schematic capture: pin labeling.

You drop the symbol onto the sheet, and then for 40 to 100+ pins you repeat the exact same manual sequence:

  1. Draw a short wire stub off the pin tip.
  2. Press L (or H for hierarchical), type the pin’s name (GPIO0, SPI0_MISO, I2C_SDA, VBUS).
  3. Rotate the label so it doesn’t collide with the symbol body.
  4. Repeat 60 times without making a single typo.

To eliminate that friction, I built Schematic Pin Labeler (schematic-pin-labeler in kicad-tools): an interactive visual tool and KiCad 9 Action Plugin that lets you label individual pins in one click—or batch-label every unconnected I/O pin on a symbol—with grid-aligned wire stubs and automatic .bak safety.


1. How the Workflow Works

[ Select Symbol in .kicad_sch ]
              │
              ▼
 Interactive Canvas (Pins color-coded by electrical type)
  ├─ Hover pin  ──► Live ghost preview of wire stub & oriented label
  ├─ Left-click ──► Toggle staged label on/off
  └─ Batch btns ──► "Label All Unconnected" or "Label I/O Only"
              │
              ▼
   [ Apply to Schematic (Ctrl+S) ]
              │
              ▼
 Atomic Temp-File Write + Automatic .kicad_sch.bak Backup
  1. Launch Standalone or from Pcbnew: Run pin-label.bat path\to\sheet.kicad_sch or click the Schematic Pin Labeler toolbar icon inside KiCad Pcbnew (which automatically locates the matching .kicad_sch for the active board).
  2. Inspect Pin States: The canvas renders the symbol with all pins color-coded by electrical type (Power, Input, Output, Bidirectional, Passive) and visually distinguishes pins that are already wired or labeled.
  3. Stage Labels with Ghost Previews: Hovering over any pin draws a live ghost preview of the wire stub and label orientation. Left-clicking toggles the label; batch buttons let you label all remaining pins or Label I/O Pins Only while skipping power (GND, +3V3, +5V) and NC pins.
  4. Commit Safely (Ctrl+S): Writes the updated S-expressions atomically via a temporary file replacement after creating a .kicad_sch.bak backup.

2. Grid Alignment & Label Types

Getting generated schematics to look hand-crafted requires respecting KiCad’s coordinate grid and text justification rules:

  • Configurable Wire Stub Lengths: Choose 0 mm (label placed directly on the pin tip), 2.54 mm (100 mil / 1 grid), 5.08 mm (200 mil / 2 grids), or 7.62 mm, snapping cleanly to the standard 50-mil / 100-mil schematic grid.
  • Auto-Justified Orientation: Labels automatically rotate and justify away from the symbol body based on the pin’s exit direction (left, right, up, down) so text never overlaps pin numbers or symbol graphics.
  • Three Label Modes:
    • Local Label: Standard sheet net label.
    • Hierarchical Label: Automatically derives the hierarchical sheet port shape (input, output, bidirectional, tri_state, passive) directly from the pin’s electrical type in the symbol definition.
    • Global Label: Project-wide net label for cross-sheet power or global buses.

3. Smart Filtering for Clean Schematics

Blindly slapping net labels onto every pin of an IC creates messy schematics—especially on power pins (VCC, GND) where you want proper power symbols, or NC pins that should remain unconnected.

Built-in filters solve this out of the box:

  • Skip Power Pins: Protects GND, VCC, +3V3, and +5V pins from receiving net labels during batch operations.
  • Skip NC Pins: Automatically ignores No-Connect pins.
  • Label I/O Pins Only: Targets only Inputs, Outputs, and Bidirectionals in a single click.

With Ctrl+S, a 64-pin MCU goes from bare symbol to cleanly stubbed, grid-aligned, typo-free net labels in under ten seconds.