How to Add Solder Mask in KiCad: A Complete Step-by-Step Guide

Learn how to add solder mask in KiCad with a clear, step-by-step workflow. Configure F.Mask and B.Mask layers, adjust mask expansion, verify with Gerber previews, and export fabrication-ready files—perfect for hobbyists and professionals alike.

SolderInfo
SolderInfo Team
·5 min read
Quick AnswerSteps

By the end, you’ll know how to add solder mask in KiCad, including enabling F.Mask and B.Mask layers, tuning mask expansion, and assigning masks to copper features. You’ll also learn how to verify masks in Gerber previews and export correct fabrication files. This practical guide draws on SolderInfo guidance for reliable PCB fabrication.

Why solder mask matters in KiCad

According to SolderInfo, the solder mask is a protective layer that covers copper traces except on pads and test points. Proper mask decisions influence solderability, splash prevention, and long-term reliability. In KiCad, planning the mask early helps ensure manufacturability and reduces post-fab rework. A well-defined solder mask also enhances signal integrity by avoiding unnecessary exposure of copper in high-current areas.

In this section we’ll cover how mask layers interact with copper, how to check mask openings around pads, and how mask expansion affects your board’s manufacturability. By understanding these basics, you’ll be ready to tailor mask coverage to each board design, whether you’re prototyping or producing a small run.

KiCad's solder mask layers explained

KiCad uses two primary mask layers: F.Mask (Top Solder Mask) and B.Mask (Bottom Solder Mask). These layers define where copper is protected from solder during assembly. A well-balanced mask strategy protects critical traces while ensuring pads remain solderable. In KiCad, mask openings around pads are automatically created based on pad settings, but you can customize them for special components or fine-pitch interfaces. The mask layers can be edited independently of copper traces, which makes it easy to tailor coverage for different board areas.

Understanding mask interactions with vias, pads, and thermal relief is essential. For example, dense areas may require tighter mask relief to prevent bridging, while power planes benefit from increased exposure for reliable solder joints. Regular validation with the Gerber viewer helps confirm that your mask apertures align with the copper footprints you designed.

Planning mask coverage and expansion

Mask expansion determines how much the mask opening grows around each pad or feature. Too much expansion can leave copper exposed where you don’t want it, while too little expansion can make soldering difficult or cause tombstoning in small components. A balanced approach considers the fabrication house’s capabilities, the component footprints, and the soldering method you plan to use. In KiCad, you adjust mask expansion in the Board Setup, under the Solder Mask settings.

A practical plan is to start with KiCad’s default values and iterate using Gerber previews. Always coordinate mask expansion with your fab’s guidelines, especially for fine-pitch components, micro vias, or unusual copper shapes. If you’re prototyping, you may begin with conservative openings and tighten them after initial testing.

tip

Tools & Materials

  • KiCad software (version 7 or newer)( PCB editor and board setup features required.)
  • Computer with Windows/macOS/Linux( Capable of running KiCad smoothly.)
  • Existing PCB design file or blank board to edit( Use a project you want to generate masks for.)
  • Gerber viewer or fabrication software( Helpful for previewing mask layers before submission.)
  • Mask color palette (optional)( Useful for visual distinction between top/bottom masks.)

Steps

Estimated time: Total time: 60-90 minutes

  1. 1

    Open KiCad and load your board

    Launch KiCad and open the PCB editor with your board file. Confirm you’re working on the correct revision, and save a backup copy before making mask changes. This ensures you can revert easily if you need to experiment with mask settings.

    Tip: Always start from a backup to avoid accidental loss of your design.
  2. 2

    Review Design Rules and Solder Mask settings

    Navigate to Board Setup and locate the Solder Mask section. Check that the Top (F.Mask) and Bottom (B.Mask) mask layers are enabled. Review any global mask expansion values and note where you may want to customize mask behavior for specific regions.

    Tip: Enabling both mask layers at this stage helps prevent missed openings later.
  3. 3

    Enable F.Mask (Top Solder Mask)

    Ensure the F.Mask layer is visible and unlocked, so you can adjust openings where needed. This layer controls solder mask coverage on the board’s top copper. Do not assume all pads will auto-open—verify pad types and footprints.

    Tip: If a pad is mounted on the top, plan its mask opening before routing nearby traces.
  4. 4

    Enable B.Mask (Bottom Solder Mask)

    Repeat the same process for the B.Mask layer if you have bottom-side components or vias that require exposure. This ensures bottom-side soldering can proceed cleanly. Verify critical vias and pad clusters receive appropriate mask openings.

    Tip: Bottom layer habits can differ from the top; plan accordingly for double-sided boards.
  5. 5

    Adjust solder mask expansion values

    Mask expansion controls how much exposed copper appears beyond the pad perimeter. Start with KiCad defaults and tailor for your fabrication house’s guidelines. Small adjustments can dramatically affect solderability, bridging risk, and manufacturability.

    Tip: Use small incremental changes and validate with Gerber previews.
  6. 6

    Protect critical copper and define openings

    Manually review pads, testpoints, and connectors. Create explicit mask openings where needed and maintain mask coverage elsewhere to minimize risk of shorts. For fine-pitch components, ensure mask relief won’t compromise pad integrity.

    Tip: Pay attention to DIP and QFP pads where alignment tolerance matters.
  7. 7

    Preview with Gerber previews or a Gerber viewer

    Generate Gerber previews for the mask layers to visually confirm openings align with footprints. Check for overlaps, misalignments, or unintended exposures. This is your early defender against manufacturing surprises.

    Tip: Toggle layer visibility to compare F.Mask vs. B.Mask and copper layers.
  8. 8

    Export Gerber files including mask layers

    Plot or export Gerber files, ensuring that both F.Mask and B.Mask layers are selected. Include the solder mask in the final fabrication deliverables. Keep your project organized with a clean directory structure for submission.

    Tip: Name your files clearly (e.g., boardname-F.Mask.gtl, boardname-B.Mask.gbl) for fab clarity.
  9. 9

    Submit to fabrication and verify once manufactured

    After submission, perform a final check using the fab’s recommended workflow. Compare the physical board to your Gerber previews and confirm mask openings align with intended pads and features. This final check minimizes rework and delays.

    Tip: Request a fab check print or overlay if available.
Pro Tip: Keep a clean separation between mask and copper layers to avoid accidental edits on copper traces.
Warning: Do not rely solely on defaults; always verify mask openings around pads of high-density footprints.
Note: If you’re unsure about expansions, start conservative and test with a small panel before committing to full boards.
Pro Tip: Use color differentiation for F.Mask and B.Mask in KiCad to reduce visual errors during editing.
Warning: Ensure mask openings do not overlap with silkscreen or board edge keep-out regions.

Quick Answers

What is solder mask in KiCad and why does it matter?

Solder mask is a protective polymer layer that covers copper traces while leaving pads open for soldering. In KiCad, configuring the mask correctly prevents solder bridges and protects traces, improving yield and reliability.

Solder mask protects copper traces and pads; configure it in KiCad to prevent soldering issues.

Where are the solder mask settings found in KiCad?

Mask settings are in the Board Setup under the Solder Mask section. You can enable F.Mask and B.Mask, adjust expansion, and tune per-feature openings from there.

Open Board Setup, go to Solder Mask, and adjust the layers and expansions.

Can I add or adjust solder mask after routing is complete?

Yes, you can modify mask settings after routing. Review all pads and vias, adjust openings, and re-export Gerber files to reflect the changes.

Mask adjustments can be made after routing, then re-export your files.

What should I check in Gerber previews for the mask layers?

Open Gerber previews to verify mask openings align with pads and footprints, and confirm there are no unwanted exposures or overlaps with other layers.

Always preview the mask layers in Gerber before submission.

How do mask expansions affect fabrication quality?

Mask expansion determines how much exposure you have around pads. It impacts solderability and bridging risk; coordinate with your fab’s guidelines.

Expansion choices influence soldering and protection—align them with fab specs.

Is solder mask color customizable in KiCad?

Mask color customization is commonly a presentation setting and may depend on your PCB viewer or fab’s capabilities. It does not affect electrical function.

Mask color is mostly a visual aid and doesn’t change how the board works.

Watch Video

Top Takeaways

  • Enable F.Mask and B.Mask to control solder mask coverage
  • Tune mask expansion thoughtfully to balance solderability and protection
  • Always verify with Gerber previews before fabrication
  • Use step-by-step plotting to prevent missing mask layers during export
  • Coordinate mask settings with your fabrication house for best results
Infographic showing a step-by-step process to add solder mask in KiCad

Related Articles