A QR code on PCB links a circuit board to production, test, repair, or warranty records. It may open a technical document or provide a unique serial number for each unit.
The finished mark must remain readable after fabrication, reflow, cleaning, coating, and assembly. Its size, contrast, placement, and marking method all matter.
Static codes often suit PCB silkscreen. Unit-level serial numbers normally require laser marking, inkjet coding, or variable-data labels. Data Matrix may be better when board space is limited.

What Is a QR Code on PCB?
A QR code on PCB is a machine-readable 2D symbol placed on a bare circuit board, assembled PCBA, production panel, or label. It can contain text, URLs, serial numbers, or a reference to an external database.
PCB QR codes generally fall into 2 categories:
- Static QR code: The same information appears on every board, such as a product number, website, manual, or assembly document.
- Serialized QR code: Each board receives a unique code linked to its production lot, test record, firmware version, repair history, or warranty information.
A static code can be included in the Gerber silkscreen layer. A serialized code changes from board to board, so it needs a variable-data process such as laser marking, inkjet printing, or automated label application.
A PCB-level code identifies the board, panel, or assembled product, while codes on IC packages identify individual components.

Why Are QR Codes Used on Circuit Boards?
QR codes improve identification and traceability while reducing manual data entry.
Typical applications include:
- PCB part number and revision identification
- Production lot and manufacturing date tracking
- Panel and unit position recording
- AOI, X-ray, ICT, and functional test linking
- Firmware programming records
- Repair and warranty history
- Access to drawings, manuals, and service instructions
- Anti-counterfeit verification
A bare PCB code may identify the fabrication lot, material batch, and revision. A PCBA code can also link component lots, SMT inspection results and functional tests, and firmware.
In high-volume production, each workstation can scan the code and update the same MES record. If an issue appears later, affected boards can be isolated quickly.
The code should therefore match the record structure used by the factory. A serial number that cannot be connected to material, process, and test data provides identification, but not complete traceability. Before production, confirm which fields will be stored, who can update them, and how long the records must remain available.
What Information Can a PCB QR Code Store?
A QR code can hold substantial data, but more characters create a denser symbol. Dense codes need smaller modules or more board area, both of which reduce manufacturing tolerance.
For PCB applications, it is usually better to encode a short identifier such as:
- Part number
- PCB revision
- Serial number
- Manufacturing lot
- Production date
- Panel and unit position
- Test record ID
- Firmware reference
- Short database URL
For example, PCB-260722-P18-U04 could identify a production date, panel, and unit position. Detailed material, inspection, test, firmware, and repair data can remain in a linked database.
Sensitive data should not be written directly into an open QR code. Use the code as a record key and protect the linked system with access control.
How Can You Add a QR Code to a PCB?
Select the marking method according to data variability, code size, durability, board material, and production stage.
| Marking method | Best suited for | Main advantages | Main limitations |
|---|---|---|---|
| PCB silkscreen | Static codes | Low additional cost and included in standard PCB artwork | Limited resolution and no unit-level variation |
| Laser marking | Unique serial numbers | Permanent, precise, and easy to automate | Additional process cost and parameter setup |
| High-temperature label | Variable data and readable text | Strong contrast and flexible format | Label and adhesive must survive assembly |
| Copper or solder mask pattern | Large static codes | Integrated into the PCB structure | Uses more board area and may have weak contrast |
| Inkjet marking | Automated variable coding | Fast and contactless | Ink durability must be validated |

PCB Silkscreen
Silkscreen suits projects where the same code appears on every PCB. The symbol is added to the legend layer and printed during standard fabrication.
Use vector artwork or generate the code directly in PCB design software. Screenshots and compressed bitmaps may produce uneven modules after Gerber conversion. Fine ink areas can also spread, merge, or become incomplete.
Laser Marking
Laser marking is usually preferred for unit-level serialization. The software generates a different code for each PCB without changing the Gerber files.
It can support automatic numbering, camera alignment, scan verification, duplicate detection, and database registration. Laser parameters must match the solder mask and laminate. Excessive energy may expose copper, while insufficient energy produces weak contrast.
High-Temperature Labels
Labels can carry both a QR code and human-readable text. They are useful when information changes late in production or strong contrast is required.
The material and adhesive must survive:
- Lead-free reflow
- Flux and cleaning chemicals
- Conformal coating
- Operating temperature and humidity
General-purpose labels are not suitable for electronics assembly.
Copper or Solder Mask Patterns
A static code can also be formed with exposed copper or solder mask openings. This creates a permanent mark without ink, but it uses more board space.
Fine copper islands and narrow solder mask webs may exceed standard fabrication capability, so this method needs DFM review.
How Does Laser QR Code Marking Work on PCB?
A laser QR code on PCB creates a permanent code on the PCB surface after solder mask processing. It is suitable for variable data because every board can receive a unique serial number.
A typical process includes:
- Define the serial-number format and starting value.
- Position the PCB or panel using fixtures or camera alignment.
- Set laser power, speed, focus, and pulse parameters.
- Generate and mark the QR code.
- Scan and verify the finished code.
- Save the result to the production database.

The laser creates contrast by removing or changing a thin surface layer without damaging the PCB structure.
The marking stage should be defined in advance. Marking before assembly provides clear surface access, but the code may later be covered by components, heat sinks, shields, connectors, or an enclosure. Marking after assembly avoids some of these risks but requires a safe area away from sensitive parts.
For quotation, specify whether the code is required on the production panel, each bare PCB, each assembled PCBA, or the final enclosure. Panel-level marking supports process tracking, but it disappears when the rail is removed.
What Size Should a QR Code on PCB Be?
There is no universal minimum size. The correct dimensions depend on:
- Encoded data length
- QR version
- Error-correction level
- Module size
- Marking process
- Surface contrast
- Scanner type
- Reading distance
A QR code is built from square modules:
A Version 1 QR code contains a 21 × 21 module data area. After adding a 4-module quiet zone on each side, the total area becomes 29 × 29 modules.
With a 0.30 mm module:
This is a geometric size, not a guaranteed manufacturing limit. Silkscreen ink spread, solder mask texture, reflection, and registration tolerance may require a larger code.
Do not approve the design from a screen image alone. A useful prototype check should include several finished boards, the planned scanner, normal production lighting, and the expected reading distance. The code should also be tested after any cleaning, coating, or assembly step that could change contrast or block access.
To improve scan reliability:
- Keep the encoded string short.
- Use the largest practical module size.
- Preserve the complete quiet zone.
- Avoid uneven scaling.
- Use vector artwork.
- Test with the intended scanner.
- Approve a fabricated sample.
Laser marking can normally support smaller modules than silkscreen. When board space is limited, shorten the identifier or consider Data Matrix. Scanner capability should be confirmed early because an industrial camera may read a smaller code than a smartphone.
Where Should You Place a QR Code on a PCB?
Place the code in a flat, open area that remains visible when scanned.
A suitable location should:
- Stay clear of pads, vias, test points, and exposed copper
- Include enough space for the full quiet zone
- Remain away from routed edges, V-scores, slots, and mounting holes
- Avoid components, shields, connectors, heat sinks, and cables
- Remain visible after enclosure assembly
- Use a consistent orientation for automated scanning
- Avoid highly reflective surfaces
- Remain readable after coating and cleaning

The top side is often easier to scan; the bottom may offer more space but become inaccessible after installation.
A code on the panel rail can track fabrication and SMT, but it disappears after depanelization. Permanent traceability therefore requires a code on each PCB.
Placement should be reviewed before layout release. Late additions often cause insufficient quiet zone, fixture interference, component coverage, or poor scanner access.
QR Code vs Data Matrix: Which Is Better for PCB Traceability?
The main decision is whether smartphone readability or compact size matters more.
| Selection factor | QR Code | Data Matrix |
|---|---|---|
| Data density | Good | Higher for compact industrial data |
| Smartphone compatibility | Widely supported | Less consistent |
| Industrial scanner support | Excellent | Excellent |
| Required PCB area | Usually larger | Usually smaller |
| Typical use | Manuals, warranty, websites, field service | Factory serialization and MES tracking |
| Suitability for small PCBs | Moderate | Strong |
| Human recognition | High | Lower |
| Laser marking | Suitable | Very suitable |

Use QR Code for smartphone access and Data Matrix when space is limited and industrial cameras handle the reading. Confirm scanner compatibility before finalizing the symbol.
Why Does a QR Code on PCB Fail to Scan?
Most failures come from the physical marking process rather than the QR logic.
Modules Are Too Small
Fine silkscreen modules may merge, spread, or disappear.
Fix: Increase module size, shorten the encoded value, or use laser marking.
The Quiet Zone Is Blocked
Nearby text, copper, vias, solder mask openings, or board edges can interfere with detection.
Fix: Treat the quiet zone as a layout keep-out area.
Contrast Is Too Low
Glossy solder mask, reflective metal, or weak laser marks reduce readability.
Fix: Evaluate the finished board under real lighting.
The Artwork Was Distorted
Uneven resizing or bitmap conversion changes module proportions.
Fix: Keep a 1:1 aspect ratio and use vector artwork.
Too Much Data Is Encoded
Long URLs and detailed text create dense codes.
Fix: Encode a short ID or database reference.
Reflection or Contamination Interferes
ENIG, coating, flux residue, or dust can blur the code.
Fix: Adjust placement or lighting and verify the code after the final surface process.
Components Cover the Code
A code may scan on the bare PCB but become inaccessible after assembly.
Fix: Review the final 3D assembly and enclosure.
A PCB QR code scanner should be validated for the planned lighting and reading distance. For mass production, define the scanner model, scan distance, lighting, inspection stage, and whether verification is sampled or performed on every unit.
How Should You Specify PCB QR Code Requirements to a Manufacturer?
Clear specifications allow the manufacturer to select the right process and quote accurately.
Provide:
- QR Code or Data Matrix
- Static or variable data
- Bare PCB or assembled PCBA
- Silkscreen, laser, inkjet, or label
- Encoded content and data format
- Serial-number sequence and starting value
- Code dimensions
- Marking side and coordinates
- Required orientation
- Solder mask color
- Panel-level or unit-level marking
- Human-readable text
- Scanner type
- Verification requirement
- Reflow, cleaning, coating, and temperature conditions
- MES or database integration requirements
A practical specification may look like this:
- Format:
BT26-XXXXXX - Starting number:
BT26-000001 - Quantity: 2,000
- Process: laser marking
- Code size: 8 × 8 mm
- Location: bottom side
- Human-readable text: serial number below the code
- Inspection: scan every unit after marking
For prototypes, scan marked samples after assembly, cleaning, and coating.
EBest Circuit can review code location, contrast, serialization, panel arrangement, and marking method during DFM and quotation. Submit the QR specification with Gerber files, BOM, assembly drawings, and test requirements.
FAQ
1. What is the minimum size for a QR code on PCB?
There is no fixed minimum size. It depends on the marking method, module size, data length, surface contrast, and scanner. A fabricated sample should be tested before mass production.
2. Is laser marking better than silkscreen for PCB QR codes?
Laser marking is better for unique serial numbers, smaller symbols, and permanent traceability. Silkscreen is more economical for larger static codes.
3. Can a QR code survive PCB reflow soldering and cleaning?
Silkscreen and properly controlled laser marks normally survive standard assembly. Labels must be rated for reflow, flux, cleaning chemicals, and operating temperature.
4. Can every PCB have a unique QR code?
Yes. Laser marking, inkjet printing, and variable-data labels can generate a different code for each board.
5. Can a smartphone scan a QR code on a circuit board?
Yes. A QR code on circuit board surfaces can be scanned when the code has sufficient size, contrast, quiet zone, and visibility. Very small industrial codes may require a dedicated scanner.
6. Should I use QR Code or Data Matrix on a small PCB?
Data Matrix is usually more space-efficient. QR Code is preferable when smartphone compatibility is important.
7. What file format should be used for a PCB QR code?
Use vector artwork or generate the code directly in PCB design software. Avoid screenshots and compressed images.
8. Why does a QR code scan on screen but fail on the finished PCB?
Common causes include small modules, silkscreen ink spread, low contrast, reflection, blocked quiet zones, coating, or distorted artwork.
Need QR Code Support for Your PCB Project?
Before requesting a quotation, define the code format, size, marking stage, serial-number rule, scanner, and verification method. EBest Circuit can review QR code placement, laser marking, panel serialization, and PCBA traceability requirements during DFM.
Send your Gerber files and project requirements to sales@bestpcbs.com.
Tags: laser QR code on PCB, PCB QR code, pcb qr code scanner, qr code on circuit board, QR code on PCB