Gerber Drill File Merger

A web-based tool that automates PCB drill file preparation for manufacturing. Reduces manual work from 20 minutes to 20 seconds.

Web Development PCB Design Automation Open Source
Gerber Drill File Merger Interface

Project Overview

From PCB Frustration to Open Source Solution

Automating PCB Manufacturing Workflow

A client-side web application that automates the merging of multiple Gerber drill files into a single manufacturing-ready file. Eliminates manual text editing and reduces pre-production time from 20 minutes to 20 seconds.

The tool was born from the frustration of manually merging PTH, NPTH, and Via drill files before PCB manufacturing - a tedious and error-prone process that every PCB designer faces.

Automated Processing

Intelligent tool renumbering and file merging with zero manual intervention

Privacy First

All processing happens locally in your browser - no file uploads to servers

Instant Results

Merge files in seconds with drag-and-drop simplicity

Drill File Merger Interface

Technical Implementation

Pure client-side solution with advanced file processing

Pure JavaScript

Built with vanilla JavaScript ES6+ for maximum compatibility and zero dependencies. No frameworks required.

Excellon Format Parser

Advanced parsing algorithm for Excellon drill files with automatic tool mapping and coordinate processing.

Responsive Design

Mobile-first approach with CSS Grid and Flexbox for seamless experience across all devices.

GitHub Pages

Deployed on GitHub Pages with zero backend infrastructure. Completely free to host and use.

Key Features

Designed for efficiency and user experience

User Interface Design

User-Centric Design

The application focuses on solving real PCB design workflow problems:

  • Drag & Drop Interface - Intuitive file upload without complex menus
  • Automatic Tool Renumbering - Prevents manufacturing errors from duplicate tool numbers
  • Real-time Processing - Instant feedback with progress indicators
  • Cross-Platform Compatibility - Works with all major EDA tools (EasyEDA, KiCad, Altium)
  • Error Handling - Comprehensive validation and user-friendly error messages

The design prioritizes simplicity while handling complex Excellon file format requirements behind the scenes.

Code Implementation

Efficient algorithms for drill file processing

Smart File Processing

The core algorithm handles the complex task of merging multiple Excellon files while maintaining manufacturing integrity:

  • Automatic detection of tool conflicts across files
  • Intelligent renumbering with size-based mapping
  • Units consistency validation (INCH/METRIC)
  • Header preservation and format compliance
  • Error recovery and user feedback

All processing happens client-side using the FileReader API, ensuring complete data privacy and security.

// Core merging algorithm async function processFiles(files) { let headers = []; let tools = new Map(); let bodies = []; let toolCounter = 1; for (const file of files) { const content = await readFile(file); const fileData = parseDrillFile(content); // Intelligent tool mapping const toolMap = new Map(); for (const [oldId, size] of Object.entries(fileData.tools)) { let newId = findToolBySize(tools, size) || assignNewTool(tools, toolCounter++); toolMap.set(oldId, newId); } // Update body with new tool IDs const updatedBody = updateToolReferences(fileData.body, toolMap); bodies.push(updatedBody); } return generateMergedFile(headers, tools, bodies); }