Software Companions - Gerber and HPGL Viewers

Convert Gerber to DXF with GerbView

Step-by-Step Guide for PCB and CAD Designers


Why DXF Matters

Modern product design sits at the intersection of electronics and mechanics. Your PCB layout doesn’t live in isolation, it must fit perfectly within an enclosure, align with mounting holes, and interact with mechanical components. Yet the PCB world speaks Gerber, while the mechanical world prefers DXF.

That’s why being able to convert Gerber to DXF quickly and accurately is invaluable. It lets you move your PCB data into almost any CAD or CAM environment—AutoCAD, SolidWorks, Fusion 360, FreeCAD, or CNC toolchains—without redrawing geometry from scratch.

With GerbView, you can do exactly that in just a few steps. This guide explains why Gerber-to-DXF conversion is useful and shows you how to perform the conversion effectively using both the graphical interface and command-line tools.


Why Convert from Gerber to DXF

Gerber files describe the copper layers, silkscreen, solder mask, and mechanical outlines of your PCB. They’re perfect for fabrication, but not for editing. DXF, on the other hand, is an open, vector-based CAD format that’s easily imported by CAD systems.
Converting to DXF offers several clear advantages:

  1. Mechanical integration: Import your board outline and holes into MCAD tools to check clearances, fit connectors, or model enclosures.
  2. CNC and machining: Many milling or laser-cutting systems natively read DXF. Converting your board outline gives you a direct manufacturing path.
  3. Documentation and drawings: Create accurate mechanical drawings or assembly documentation directly in your CAD tool.
  4. Editable geometry: DXF data is editable, so you can tweak outlines, add annotations, or reuse PCB shapes in other projects.

In short, DXF is your bridge between the PCB and mechanical design worlds.


Converting Gerber to DXF in GerbView (GUI Method)

1. Load your Gerber files

Open GerbView and choose File → Add Layer (or use the Home toolbar). Select your Gerber and Excellon drill files to load them into the project.
Each file will appear as a separate layer in the left-hand panel.
In the screenshot below we've loaded one of the projects that are included with GerbView:

GerbView with Gerber layers loaded

2. Verify scale and alignment

Before exporting, confirm that all layers are aligned and scaled correctly. Use the Measure tool to check known dimensions, such as the board width or a mounting-hole spacing.
If layers appear misaligned, use Align Layers from the Tools tab. Setting the correct origin for all layers ensures your DXF will import cleanly into other CAD systems.


3. Adjust DXF conversion options

By using the default settings, the converted DXF file will look identical to the original Gerber design. However, depending on your needs, you may want to adjust the available conversion options to create different types of output.


The DXF conversion settings can be found in the Application Options dialog, located under the Settings tab.
The following options are available:

  • File Units:
    Select the measurement unit for the exported DXF file — either Inch (English) or Metric.
  • Use Line Widths:
    Enable or disable the use of line widths. When this option is disabled, tracks and flashes are exported as outlines only.
  • Replace Arcs with LWPOLYLINE if Possible:
    When enabled, all arcs with line width are replaced with LWPOLYLINE elements. This ensures that line widths are preserved, since standard ARC entities do not support line width.
  • Output round Pads as Circles: Enable this option to export round pads using the CIRCLE entity type instead of the default LWPOLYLINE.
    Note: CIRCLE entities are exported as outlines only.
  • Add Circles to All Tracks (Rounded):
    Enable this option to add a filled circle to the end of each exported track, making the tracks appear rounded.

4. Select DXF conversion method

The DXF conversion tools are located under the Conversion tab.
GerbView allows you to choose between two export methods:

  • Combine all layers into a single DXF file:
    Each loaded layer will become a separate layer within the final DXF file.
    Use the Save as DXF option to create this type of file.
  • Export each layer as a separate DXF file:
    Use the Save as DXF Multi-file option to generate one DXF file per layer.

5. Export to DXF and verify

After you have generated the DXF file, open it in your target CAD program and check the following:

  • Known dimensions measure correctly (verifies scale).
  • Layer names match your expectations (copper, outline, silkscreen).
  • Filled areas look correct—if performance is slow, re-export with outlines instead of filled polygons.

Once verified, your board geometry is ready for mechanical design, CNC processing, or documentation.


In the screenshot below, you can see the result of a single file DXF conversion, displayed in Autodesk TrueView:


Exported DXF file displayed in Autodesk TrueView

Batch Conversion with the Command Line

For automation or batch processing, GerbView’s command-line interface (CLI) provides full control over file conversion.
This is ideal for automated workflows generating mechanical data from PCB designs.


Examples

Convert a single file to DXF:

	GerbView.exe /c DXF "C:\input\board_top.gbr" "C:\output\board_top.dxf"
		

Merge multiple Gerber layers into one DXF (using wildcards):

	GerbView.exe /cm DXF "C:\output\merged_board.dxf" "C:\input\*.gbr"			
		

For a complete list of available switches, see the GerbView Command-Line Overview.


Tips for a Smooth Conversion

  • Check units and origin: Always verify measurements inside GerbView before export.
  • Simplify when needed: Large copper pours create heavy DXF files. Exporting outlines only can make imports faster in CAD tools like Fusion 360.
  • Keep layer naming consistent: Use clear names (e.g., “TopCopper”, “BoardOutline”) so downstream engineers instantly know what’s what.
  • Verify drills: Make sure drill holes are exported as circles and maintain their diameter.
  • Archive both: Save your Gerber and the generated DXF together for traceability.

Conclusion

Converting Gerber to DXF isn’t just about file formats—it’s about collaboration. It ensures that electrical and mechanical designs stay perfectly aligned, enabling faster prototypes and fewer fit issues. GerbView makes that process simple and reliable, whether you’re converting one board or hundreds. With proper alignment, units, and export settings, you can generate high-quality DXF files that flow smoothly into any CAD workflow.


Ready to try it yourself?

Download the latest version of GerbView, load your Gerber files, and create your first DXF export in minutes.
Click here to download a 30-days trial now


Read more about GerbView