Contact Sales & After-Sales Service

Contact & Quotation

  • 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.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

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 Compare Two Gerber Files for Differences: Complete PCB Revision Guide

When you’re working through revision B of a PCB design and the customer swears they only changed one resistor value, how do you verify what actually changed in the Gerber files? Manual inspection of complex multilayer boards is practically impossible—even experienced engineers miss subtle differences when eyeballing two nearly identical layouts. The ability to compare two Gerber files for differences is an essential skill that saves countless hours and prevents manufacturing mistakes. This guide covers the methods, tools, and best practices for identifying exactly what changed between PCB revisions.

Why Comparing Gerber Files Matters

Gerber file comparison serves multiple critical purposes throughout the PCB development lifecycle. Whether you’re tracking engineering changes, validating design migrations, or verifying that exported files match your CAD data, reliable comparison methods prevent costly manufacturing errors.

Common Scenarios Requiring Gerber Comparison

ScenarioDescriptionRisk If Undetected
Revision ControlTracking changes between design versionsBuilding obsolete version, mixed inventory
ECO VerificationConfirming engineering change orders implemented correctlyChange not applied, original problem persists
CAD MigrationValidating design after moving between software toolsLost features, altered dimensions
Vendor CommunicationVerifying manufacturer received correct filesWrong board fabricated
Audit TrailDocumenting exactly what changed and whenCompliance failures, liability issues
Error InvestigationTracing when a problem was introducedRepeated errors in future revisions

The challenge is that Gerber files contain thousands of coordinate commands, aperture definitions, and drawing operations. Two files can look identical on screen yet have critical differences buried in the data. Automated comparison tools reveal these hidden changes that visual inspection misses.

Methods for Comparing Gerber Files

Several approaches exist for identifying differences between Gerber files, ranging from simple visual overlay to sophisticated automated analysis.

Visual Overlay Comparison

The most basic comparison method involves loading both Gerber files into a viewer and displaying them overlaid on each other. Using contrasting colors for each file makes differences visible where the colors don’t match.

Pros: Simple, requires no specialized software, intuitive results.

Cons: Misses subtle differences, time-consuming for large boards, depends on human attention.

XOR (Exclusive OR) Comparison

XOR comparison is a mathematical operation borrowed from the integrated circuit industry. When two Gerber files are XOR’d together, any areas that are identical cancel out, leaving only the differences visible.

How XOR comparison works:

File AFile BXOR Result
Copper presentCopper presentEmpty (no difference)
Copper absentCopper absentEmpty (no difference)
Copper presentCopper absentDifference shown
Copper absentCopper presentDifference shown

The result is another Gerber file containing only the differences. If the two original files are identical, the XOR output is completely empty. Any features in the XOR file represent changes between revisions.

Color-Coded Graphical Comparison

Advanced comparison tools use color coding to show additions, deletions, and unchanged areas simultaneously:

ColorMeaning
GreenAdded in new revision
RedRemoved from old revision
Gray/YellowUnchanged between versions

This approach provides more context than XOR comparison by showing what was added versus removed, not just that something changed.

Layer-by-Layer Automated Analysis

Professional CAM software performs automated layer comparison that identifies and catalogs all differences. The software generates a report listing each change with coordinates, affected features, and often a visual marker on the design.

Step-by-Step Gerber Comparison Process

Regardless of which tool you use, the comparison process follows a consistent workflow.

Step 1: Prepare Files for Comparison

Before comparing, ensure both file sets are properly organized:

Verify file completeness. Both revisions should contain the same set of layers. Missing layers in either set will generate false “differences” during comparison.

Match layer assignments. Ensure top copper compares to top copper, not bottom copper. File naming conventions vary between CAD tools, so verify layer mapping before proceeding.

Check coordinate origins. Both file sets should share the same coordinate origin. If origins differ, every feature will appear as a difference even if the designs are identical.

Step 2: Load Files into Comparison Tool

Import both Gerber file sets into your comparison software:

Load the baseline (old) revision first. This establishes the reference against which changes are measured.

Load the new revision second. The comparison will identify what changed relative to the baseline.

Verify layer pairing. Confirm the tool correctly matched corresponding layers from each revision.

Step 3: Align Layers if Necessary

If the two designs have different origins or scaling:

Use alignment features. Most comparison tools include alignment functions that let you specify reference points to register the two datasets.

Pick unambiguous alignment features. Choose mounting holes, fiducial marks, or board corners that exist in both revisions and haven’t moved.

Verify alignment visually. After automatic alignment, spot-check several locations to confirm correct registration.

Step 4: Run Comparison

Execute the comparison function:

Select comparison method. Choose graphical overlay, XOR, or automated difference detection depending on your tool’s capabilities.

Configure sensitivity settings. Some tools allow filtering of minor differences below a threshold size to focus on significant changes.

Process all relevant layers. Compare copper layers, solder mask, silkscreen, and drill files—changes can occur on any layer.

Step 5: Review and Document Results

Analyze the comparison output:

Examine each flagged difference. Don’t assume all changes are intentional. Unexpected differences may indicate export errors or unintended modifications.

Correlate with ECO documentation. Verify that changes match the engineering change order. Missing expected changes or unexpected modifications require investigation.

Save comparison results. Export reports, screenshots, or XOR files for documentation and audit trail purposes.

Tools for Comparing Gerber Files

Multiple software options support Gerber comparison, from free viewers to professional CAM systems.

Online Gerber Comparison Tools

ToolURLFeatures
Altium 365 Gerber Comparealtium.com/gerber-compareCloud-based, side-by-side view, difference highlighting
Gerber Compare (Elysics)gerbercompare.comLayer-by-layer comparison, image export
HQDFM (NextPCB)nextpcb.com/free-online-gerber-viewerDFM analysis plus basic comparison

Advantages: No installation required, accessible from any browser, free to use.

Limitations: File upload size limits, potential privacy concerns for sensitive designs, limited advanced features.

Desktop Gerber Comparison Software

SoftwareCostPlatformKey Comparison Features
GerbViewCommercialWindowsVisual overlay, color-coded differences, “Only Show Differences” mode
CAM350CommercialWindowsAutomated layer compare, difference flagging, report generation
FAB 3000CommercialWindowsJob comparison, graphical/XOR modes, difference navigation
GBRUtilCommercialWindowsXOR boolean operations, overlay visualization
ViewMateFree/PaidWindowsLayer overlay, manual comparison
GerbvFreeAllXOR rendering mode, overlay display
GrbDiffFreePython scriptAutomated layer matching, PNG export with differences marked

Comparison Features in CAD Software

CAD ToolComparison Capability
Altium DesignerIntegrated Gerber compare through Altium 365
KiCad GerbViewManual overlay, XOR display mode
OrCADVia CAM software integration
EagleExternal tools required

Using Gerbv for Free XOR Comparison

Gerbv, the free open-source Gerber viewer, includes an XOR rendering mode useful for comparison.

Gerbv XOR Comparison Steps

Step 1: Load the first Gerber file (baseline revision).

Step 2: Load the corresponding layer from the second revision as a separate layer.

Step 3: Right-click on one of the layers and select the XOR rendering mode from the display options.

Step 4: Areas that are identical will cancel out. Remaining visible features represent differences.

Step 5: Toggle layers on and off to understand whether differences represent additions or deletions.

Limitations: Gerbv’s XOR mode works but lacks the sophisticated difference cataloging and navigation features of commercial tools. For complex boards with many changes, manual review of XOR results becomes tedious.

Using GerbView for Color-Coded Comparison

GerbView offers a dedicated comparison feature with intuitive color-coded output.

GerbView Comparison Steps

Step 1: Load both revisions into GerbView as separate layers.

Step 2: Select the Compare Layers tool from the Home tab.

Step 3: Select the two layers to compare and press OK.

Step 4: GerbView displays both files overlaid with color coding: one color for the old revision, another for the new, and a third where they match.

Step 5: Enable “Only Show Differences” mode to hide unchanged areas and focus on modifications.

Step 6: Use the “Unchanged Color” slider to adjust visibility of common features.

Using CAM350 for Automated Comparison

CAM350 provides comprehensive automated comparison with difference flagging and navigation.

CAM350 Layer Compare Process

Step 1: Load both Gerber files as separate layers within the same job.

Step 2: Navigate to Analysis → Compare Layers.

Step 3: Select the two layers to compare.

Step 4: CAM350 processes the comparison and reports the number of differences found.

Step 5: A Control Panel appears listing all detected differences with layer and location information.

Step 6: Click entries in the Control Panel to navigate directly to each difference location.

Step 7: Review each difference in context against the surrounding design.

Best Practices for Gerber File Comparison

Experience with hundreds of revision comparisons has revealed several practices that improve accuracy and efficiency.

Establish Consistent File Naming

Use consistent naming conventions across revisions so comparison tools can automatically match corresponding layers. Inconsistent naming forces manual layer pairing and increases error risk.

Compare All Layers, Not Just Copper

Changes can occur on any layer. Solder mask modifications affect assembly. Silkscreen changes impact component identification. Drill file differences alter hole placement. Compare every layer type, not just copper routing.

Document Comparison Results

Save comparison outputs as part of your revision documentation. When questions arise later about what changed and when, having archived comparison results provides answers without re-running analysis.

Verify Unexpected Differences

If comparison reveals changes not documented in the ECO, investigate before proceeding. Unexpected differences may indicate CAD software bugs, export errors, or unauthorized modifications.

Use Comparison as Release Gate

Make Gerber comparison a required step before releasing files to manufacturing. Verify that intended changes are present and no unintended changes occurred during the export process.

Useful Resources for Gerber Comparison

Free Comparison Tools

ResourceURLDescription
Gerbvgerbv.github.ioFree viewer with XOR mode
GrbDiff (GitHub)github.com/dennevi/GrbDiffPython script for automated comparison
Altium 365 Gerber Comparealtium.com/gerber-compareFree online comparison
Gerber Compare (Elysics)gerbercompare.comFree online layer comparison

Commercial Comparison Software

ResourceURLDescription
GerbViewgerbview.comDedicated Gerber viewer with comparison
CAM350downstreamtech.com/products/cam350Professional CAM with comparison
FAB 3000numericalinnovations.comCAM software with job comparison
GBRUtilartwork.com/gerber/gbrutilGerber boolean operations

Documentation and Tutorials

ResourceURLDescription
Altium 365 Gerber Compare Tutorialmy.altium.com/altium-365/getting-started/gerber-compareVideo walkthrough
GerbView Compare Tutorialgerbview.com/gerber-compare.htmlStep-by-step guide
Ucamco Gerber Format Specificationucamco.comOfficial format documentation

Frequently Asked Questions

Can I compare Gerber files from different CAD tools?

Yes, Gerber files from different CAD tools can be compared since Gerber is a standardized format. However, different CAD packages may generate slightly different representations of the same design. Polygon fills might use different algorithms, trace segments might be divided differently, and coordinate precision may vary. These implementation differences can create apparent “differences” that don’t represent actual design changes. When comparing files from different CAD tools, focus on functionally significant differences (missing pads, added traces, moved components) rather than minor rendering variations in ground planes or fill patterns.

How do I compare drill files between revisions?

Drill files (Excellon format) can be compared using the same tools and methods as Gerber files. Load both drill files into your comparison software and perform overlay or XOR comparison. Look for added holes, deleted holes, moved hole positions, and changed hole sizes. Some comparison tools support drill-specific analysis that reports tool table differences in addition to graphical comparison. When comparing drill files, pay particular attention to coordinate format settings—mismatched formats can make identical files appear completely different due to scaling or offset issues.

What if the two Gerber files have different coordinate origins?

Different coordinate origins cause every feature to appear as a difference during comparison, producing useless results. Before comparing, align the two datasets to a common reference. Most comparison tools include alignment features where you specify corresponding points in each file (board corners, mounting holes, fiducials). The software calculates the offset and registers the files before comparison. If your tool lacks automatic alignment, you may need to manually adjust the origin of one file set in your CAD software and re-export before comparing.

How do I filter out insignificant differences during comparison?

Some comparison tools allow setting a minimum feature size threshold that ignores differences below that size. This filters out minor variations in fill patterns or trace edge resolution that don’t affect board functionality. Start with a conservative threshold (zero) for initial comparison to see all differences, then increase the threshold if reviewing minor variations becomes overwhelming. Always review at least a sample of filtered differences to ensure you’re not hiding significant changes. For critical designs, compare with zero threshold and manually categorize each difference as significant or insignificant.

Can I automate Gerber comparison for continuous integration?

Yes, command-line comparison tools enable automated comparison as part of continuous integration pipelines. GrbDiff (Python script) and some commercial tools support batch processing and scripted operation. Configure your CI system to run comparison between the current build and previous release, generating difference reports automatically. Fail the build if unexpected differences appear, requiring engineer review before proceeding. This approach catches unintended changes early and creates an automatic audit trail of design evolution. Some teams integrate comparison with version control hooks, running comparison automatically when Gerber files are committed.

Conclusion

The ability to compare two Gerber files for differences is fundamental to professional PCB development. Whether tracking revisions, validating ECOs, verifying CAD migrations, or investigating manufacturing problems, reliable comparison methods prevent errors that cost time and money.

Start with free tools like Gerbv or online comparison services for occasional needs. As comparison becomes a regular part of your workflow, consider dedicated software like GerbView or CAM350 that provides automated difference detection, navigation, and reporting.

Make comparison a standard gate in your release process. Before any Gerber package goes to manufacturing, compare it against the previous revision and verify that all changes are intentional and documented. This simple discipline catches export errors, unintended modifications, and missing ECO implementation before they become expensive manufacturing problems.

The few minutes invested in systematic Gerber comparison pays dividends in reduced respins, cleaner revision history, and confidence that your manufactured boards match your design intent.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • 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.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

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.