Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
How to Generate Gerber Files from LibrePCB: Complete Guide for PCB Manufacturing
If you’ve been designing PCBs with LibrePCB and you’re ready to send your board for fabrication, you need to generate Gerber files. I’ve been working with various EDA tools for years, and LibrePCB has become one of my favorites for its clean interface and straightforward export process.
LibrePCB is a free, cross-platform electronic design automation suite that’s been gaining serious traction in the open-source hardware community. Started in 2013 by Urban Bruhin, it’s built from the ground up with modern design principles that make both creating and exporting PCB designs remarkably intuitive. Unlike some other EDA tools where exporting manufacturing files feels like an afterthought, LibrePCB’s Output Jobs system is designed to handle production data like a professional.
Understanding LibrePCB and Its Approach to PCB Design
Before diving into the Gerber export process, it’s worth understanding what makes LibrePCB different. This free EDA software runs on Windows, Linux, and macOS, supports 22 different languages, and doesn’t require an online account or subscription. There are no artificial limitations on board size, layer count, or commercial use of your designs.
What I particularly appreciate about LibrePCB is its automated forward annotation system. The electrical circuit of your PCB is always in sync with your schematics. Whenever you modify the schematic, the board updates automatically. This eliminates a whole category of errors that plague other design tools.
Key LibrePCB Features for Manufacturing Output
Feature
Description
Manufacturing Benefit
RS-274X (Gerber X2) Export
Modern Gerber format with embedded attributes
Better manufacturer compatibility
Excellon Drill Files
IPC-NC-349/XNC format
Standard drill file support
Configurable Output Jobs
Save and reuse export configurations
Consistent output every time
Preset Configurations
Default and Protel naming conventions
Quick setup for different manufacturers
Pick & Place Export
CSV and Gerber X3 formats
Assembly automation support
BOM Generation
Bill of materials export
Complete manufacturing package
What Are Gerber Files and Why Do They Matter?
Gerber files are the universal language between PCB designers and manufacturers. Named after the Gerber Scientific Instrument Company that developed the format in the 1960s, these files contain 2D vector data describing each layer of your circuit board with extreme precision.
When you send your design to any PCB fabrication house, they need these files to produce your boards. Each Gerber file represents a single layer, whether that’s copper, solder mask, silkscreen, or board outline. The modern RS-274X format (also called Extended Gerber or Gerber X2) embeds all necessary aperture definitions within the files, eliminating the compatibility issues that plagued older formats.
Gerber Files Required for PCB Production from LibrePCB
For a complete manufacturing package from LibrePCB, you’ll typically need to generate these files:
File Type
LibrePCB Default Extension
Protel Extension
Purpose
Top Copper
*-COPPER-TOP.gbr
*.GTL
Component side traces
Bottom Copper
*-COPPER-BOT.gbr
*.GBL
Solder side traces
Top Solder Mask
*-STOPMASK-TOP.gbr
*.GTS
Mask openings (top)
Bottom Solder Mask
*-STOPMASK-BOT.gbr
*.GBS
Mask openings (bottom)
Top Silkscreen
*-SILKSCREEN-TOP.gbr
*.GTO
Component markings
Bottom Silkscreen
*-SILKSCREEN-BOT.gbr
*.GBO
Bottom markings
Board Outline
*-OUTLINES.gbr
*.GKO
Physical dimensions
Drills PTH
*-DRILLS-PTH.drl
*.DRL
Plated through holes
Drills NPTH
*-DRILLS-NPTH.drl
*.DRL
Non-plated holes
Inner Layers
*-COPPER-INx.gbr
*.G1, *.G2
For multilayer boards
Preparing Your LibrePCB Design for Gerber Export
Before generating your Gerber files, there are several essential steps to ensure your output is manufacturing-ready. Skipping these can lead to rejected boards or costly fabrication errors.
Running Design Rule Checks
LibrePCB includes a built-in Design Rule Check (DRC) that should always be run before export. The DRC verifies that your design meets the specified manufacturing constraints such as minimum trace width, spacing requirements, drill sizes, and annular ring specifications.
To run the DRC, open your board in the board editor and navigate to the DRC function. Review any warnings or errors carefully and address them before proceeding with export.
Verifying Board Outline and Dimensions
Your board outline must form a complete, closed shape. LibrePCB will export this to a dedicated outline Gerber file that manufacturers use to determine where to cut your board. Make sure there are no gaps in the outline and that any internal cutouts are properly defined.
Checking Layer Configuration
In LibrePCB’s board setup dialog, verify that your silkscreen layers are properly configured. The software allows you to control which layers (Top/Bottom Placement, Names, Values) are included in the silkscreen output. Ensure these settings match your requirements before generating files.
Step-by-Step Guide to Generate Gerber Files from LibrePCB
Now let’s walk through the actual process of generating Gerber files from LibrePCB. The software uses a powerful Output Jobs system that allows you to configure your export settings once and reuse them for future exports.
Step 1: Open the Output Jobs Dialog
From either the schematic editor or board editor, open the Output Jobs dialog by navigating to File → Output Jobs, or simply press F11. This opens the central hub for all your manufacturing output needs.
The Output Jobs dialog presents a list of configurable export jobs on the left side, with detailed settings for the selected job on the right.
Step 2: Add or Configure a Gerber/Excellon Output Job
LibrePCB organizes production outputs as “jobs” that can be run individually or in batches. Look for the Gerber/Excellon job type in the available jobs list. If one doesn’t exist, you can add it by clicking the appropriate button to create a new output job of this type.
The Gerber/Excellon job generates both RS-274X Gerber files and IPC-NC-349/XNC Excellon drill files in a single operation.
Step 3: Configure Output Directory and Base Filename
At the top of the job configuration, you’ll find settings for the output path and filename template. By default, LibrePCB generates all output files into the project directory under output/<VERSION>/, where <VERSION> is your project’s version number.
You can customize the base filename using placeholders like {{PROJECT}} for the project name. This allows flexible naming conventions while maintaining consistency across projects.
Step 4: Configure Gerber Layer Settings
The Gerber/Excellon job dialog includes settings for each layer type. Here’s what you need to configure:
Copper Layer Settings:
Setting
Description
Top Copper Suffix
File extension for top copper layer
Bottom Copper Suffix
File extension for bottom copper layer
Inner Layer Suffix
Pattern for inner layers (use {{LAYER}} placeholder)
Solder Mask Settings:
Setting
Description
Top Solder Mask Suffix
Extension for top soldermask
Bottom Solder Mask Suffix
Extension for bottom soldermask
Silkscreen Settings:
The silkscreen export respects your board setup configuration. If you’ve disabled certain silkscreen layers in the board setup, they won’t be generated even if suffixes are configured here.
Step 5: Configure Drill File Settings
LibrePCB provides several important options for drill file generation:
Separate PTH and NPTH Files: By default, LibrePCB generates separate drill files for plated through-holes (PTH) and non-plated holes (NPTH). This is the recommended approach for most manufacturers.
Merge PTH and NPTH Option: Some budget PCB manufacturers cannot handle separate drill files. LibrePCB provides a checkbox to merge all drills into a single file. While not recommended for precision work, this option ensures compatibility with simpler manufacturing processes.
G85 Slot Command Option: If your board contains slots, LibrePCB exports them using G00..G03 commands by default. Some manufacturers may require the G85 slot command instead. A checkbox allows you to enable this alternative format if needed.
Step 6: Choose Between Default and Protel Naming Conventions
LibrePCB provides two predefined configurations for file naming:
Configuration
Copper Files
Mask Files
Description
Default (.gbr)
*-COPPER-TOP.gbr
*-STOPMASK-TOP.gbr
Descriptive names
Protel
*.GTL, *.GBL
*.GTS, *.GBS
Industry-standard extensions
Many PCB manufacturers prefer the Protel naming convention because it’s widely recognized and their automated systems can easily identify each layer type. However, the default naming is more human-readable and works perfectly well with most manufacturers.
Buttons in the dialog allow you to quickly switch between these presets, or you can manually customize each suffix to match your manufacturer’s specific requirements.
Step 7: Generate the Output Files
Once your configuration is complete, click the Generate button (or Run button, depending on your LibrePCB version) to create all the output files. LibrePCB will generate the complete set of Gerber and drill files in your specified output directory.
The generated files will be placed in the project’s output folder, organized by version number. This makes it easy to maintain different revisions of your manufacturing data.
Using LibrePCB CLI for Automated Gerber Generation
For advanced users and CI/CD workflows, LibrePCB provides a command-line interface (librepcb-cli) that can automate the generation of manufacturing data. This is particularly useful for teams that want to integrate PCB output generation into their build pipelines.
The CLI can run the same Output Jobs you configure in the GUI, ensuring consistent output whether generated manually or through automation. This capability is one of the features that sets LibrePCB apart from many other free EDA tools.
Verifying Your Gerber Files Before Manufacturing
Never send Gerber files to a manufacturer without verification. I cannot stress this enough. A few minutes spent reviewing your files can save days of waiting and significant money on unusable boards.
Recommended Gerber Viewers
LibrePCB documentation recommends using the official Gerber reference viewer from Ucamco, but several other excellent options exist:
Viewer
Platform
Key Features
KiCad GerbView
Cross-platform
Part of KiCad suite, reliable
Gerbv
Linux, Windows
Open-source, lightweight
Reference Gerber Viewer
Online
Official Ucamco viewer
FlatCAM
Cross-platform
Also for CAM preparation
ViewMate
Windows
Industry standard
Verification Checklist
When reviewing your generated Gerber files, verify the following:
Check Item
What to Look For
Layer Count
Correct number of copper layers present
Layer Alignment
All layers properly registered
Board Outline
Closed shape, correct dimensions
Drill Alignment
Holes centered on pads
Solder Mask
Openings properly sized
Silkscreen
Text readable, not overlapping pads
Inner Layers
Planes and traces correct (if applicable)
Using LibrePCB Fab Service as an Alternative
LibrePCB offers an integrated fabrication service called LibrePCB Fab that can simplify the ordering process. Instead of manually generating and uploading Gerber files, you can order directly from within the application.
This service works with partner manufacturers (currently AISLER and PCBWay as of the latest information) and handles all the file generation automatically. While this is convenient, you can always choose to export traditional Gerber files and use any manufacturer you prefer. The LibrePCB team is committed to keeping the traditional export functionality intact.
Common LibrePCB Gerber Export Issues and Solutions
Based on community feedback and my own experience, here are some common issues encountered when exporting Gerber files from LibrePCB and their solutions.
Through-Hole Pads Appearing on Wrong Layers
Some users have reported that through-hole pad graphics appear on copper layers where they shouldn’t be visible. This typically relates to how LibrePCB handles multi-layer pads. The solution is to verify your footprint definitions and ensure pad types are correctly specified in your library components.
Missing Silkscreen Layers
If your silkscreen Gerber files are empty or not generated, check your board setup dialog. LibrePCB allows you to configure which layers contribute to the silkscreen output. If all contributing layers are disabled, no silkscreen file will be generated.
Drill-to-Pad Misalignment
When drill holes don’t align with pads in your Gerber viewer, the issue is usually in the viewer settings rather than the LibrePCB output. Verify that your viewer is using the same coordinate format and units as the generated files.
Best Practices for Manufacturing-Ready Output from LibrePCB
Following these best practices will help ensure your LibrePCB Gerber files are accepted by manufacturers without issues.
Use Protel Extensions for Wider Compatibility: While LibrePCB’s default naming is descriptive, many automated systems expect Protel-style extensions. Using .GTL, .GBL, etc., reduces the chance of layer misidentification.
Generate Separate PTH and NPTH Drill Files: Unless your manufacturer specifically requests otherwise, keep plated and non-plated holes in separate files. This gives the fabricator clearer instructions and reduces error potential.
Include All Necessary Layers: Always double-check that solder paste layers are included if you need stencils, and that all copper layers are present for multilayer boards.
Package Files Properly: Create a ZIP archive containing all Gerber files, drill files, and any supporting documentation. Keep everything in a single folder level within the archive for easiest processing.
Useful Resources for LibrePCB Users
Here are essential resources for working with LibrePCB and generating manufacturing files:
Official LibrePCB Resources
Resource
URL
Description
LibrePCB Website
librepcb.org
Main project website
User Manual
librepcb.org/docs/user-manual
Complete documentation
Download Page
librepcb.org/download
All platforms
GitHub Repository
github.com/LibrePCB/LibrePCB
Source code
Discussion Forum
librepcb.discourse.group
Community support
Platform Downloads
Platform
Installation Method
Windows
Installer from download page
Linux
AppImage, Snap, or distribution packages
macOS
DMG from download page
Arch Linux
AUR package (librepcb or librepcb-appimage)
FreeBSD
librepcb port
Free Gerber Viewers
Viewer
Download Location
KiCad GerbView
kicad.org
Gerbv
gerbv.geda-project.org
Reference Viewer
gerber-viewer.ucamco.com
FlatCAM
flatcam.org
Frequently Asked Questions
What Gerber format does LibrePCB use for export?
LibrePCB exports Gerber files in the RS-274X format, also known as Gerber X2 or Extended Gerber. This modern format embeds all aperture definitions and layer attributes within the files themselves, eliminating compatibility issues associated with older formats. For drill files, LibrePCB uses the IPC-NC-349/XNC Excellon format, which is universally accepted by PCB manufacturers.
Can I use any PCB manufacturer with LibrePCB Gerber files?
Yes, absolutely. While LibrePCB offers an integrated fabrication service with partner manufacturers, you are completely free to export traditional Gerber files and use any manufacturer you prefer. The LibrePCB team is committed to keeping this capability intact because they believe choosing a PCB manufacturer should always be up to you.
How do I handle multilayer boards in LibrePCB?
LibrePCB fully supports multilayer PCB designs. When exporting Gerber files for boards with more than two copper layers, LibrePCB generates separate files for each inner layer. The {{LAYER}} placeholder in the filename configuration allows automatic numbering of inner copper layers. Make sure to verify in your Gerber viewer that all inner layers are present and correctly ordered before sending to manufacturing.
Why are my drill files not aligning with pads in the Gerber viewer?
Drill-to-pad misalignment in a viewer is typically a viewer configuration issue rather than a problem with LibrePCB’s output. Ensure your Gerber viewer is using compatible settings for units and coordinate format. If issues persist, try the official Ucamco reference Gerber viewer, which is designed to display files exactly according to the specification.
Can I automate Gerber generation from LibrePCB?
Yes, LibrePCB provides a command-line interface (librepcb-cli) that allows automated generation of manufacturing data. This is particularly useful for continuous integration workflows where you want to automatically generate production files as part of your build process. The CLI can run the same Output Jobs you configure in the graphical interface, ensuring consistent results.
Conclusion
Generating Gerber files from LibrePCB is a straightforward process thanks to its well-designed Output Jobs system. The key steps involve opening the Output Jobs dialog, configuring your Gerber/Excellon job settings with appropriate file naming and layer options, and then generating all files with a single click.
LibrePCB strikes an excellent balance between simplicity and professional capability. The ability to save output configurations means you only need to set things up once, and the preset options for default versus Protel naming conventions cover the most common manufacturer requirements.
Remember to always verify your Gerber files in a dedicated viewer before sending them to manufacturing. The few minutes spent on verification can save significant time and money by catching errors before fabrication begins.
Whether you’re a hobbyist creating your first PCB or a professional looking for a capable open-source alternative, LibrePCB’s manufacturing output capabilities provide everything you need to take your designs from screen to production. The software continues to evolve with regular updates, and the 1.0 release milestone demonstrated the project’s commitment to providing a complete, production-ready EDA solution.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.