Free QR Code and Data Matrix Generator with Logo, Styles, SVG, PDF and DXF Export for Laser Part Marking
Make QR codes and Data Matrix codes for websites, Wi-Fi, contacts and more, or for marking parts with a part number, CAGE code, serial number and date. Style them, add a logo, and export PNG, SVG, PDF, EPS or a true-size DXF for CAD and laser engravers. Free, no sign-up, and the codes never expire.
Starts with https:// if you leave it off. Shorter addresses make smaller, easier-to-scan codes.
| Label | Value | Varies |
|---|
One code holds one link. To share several profiles at once, link to a page that lists them all.
<RS> record separator (30), <GS> group separator (29), <EOT> end of transmission (4).
CAD exports (DXF, CAD SVG, PDF, EPS) are always plain black squares at exactly this cell size, whatever the style above. "Shrink" makes each square smaller by your beam width; it applies to one-square-per-cell geometry.
Read a QR code or Data Matrix from a picture
See exactly what an existing code holds, including hidden control characters. Pick a photo or screenshot, or paste one (Ctrl+V). It's read on your device.
What each type puts in the code
A QR code holds only text. Your phone decides what to do from how that text starts. These are the formats this page writes.
| Type | Text in the code (example) | What a phone does |
|---|---|---|
| Website | https://example.com/page | Opens the page |
| Plain text | Any text you type | Shows the text |
| Part marking, labeled | PN:ABC-100 DOM:05/2026 MFR:1A2B3 SN:0001 | Shows the text; scanners send it to a database |
| Part marking, ISO/IEC 15434 format 12 | [)><RS>12<GS>MFR 1A2B3<GS>PNO ABC-100<GS>SEQ 0001<RS><EOT> | Industrial readers split it into fields |
| Part marking, ISO/IEC 15434 format 06 | [)><RS>06<GS>17V1A2B3<GS>1PABC-100<GS>S0001<RS><EOT> | Industrial readers split it into fields |
| Phone | tel:+15550100199 | Offers to call |
| Text message | SMSTO:+15550100199:Hello | Opens a new message |
mailto:name@example.com?subject=Hi | Opens a new email | |
| Wi-Fi | WIFI:T:WPA;S:Shop Wi-Fi;P:secret;; | Offers to join the network |
| Contact card | BEGIN:VCARD … END:VCARD (vCard 3.0) | Offers to save the contact |
| Social media | https://www.instagram.com/name | Opens the profile |
| Location | geo:47.6062,-122.3321 | Opens a map |
| Event | BEGIN:VEVENT … END:VEVENT (iCalendar) | Offers to add it to the calendar |
QR Code or Data Matrix?
| QR Code | Data Matrix (ECC 200) | |
|---|---|---|
| Standard | ISO/IEC 18004 | ISO/IEC 16022 |
| Phone cameras | Read by the built-in camera on iPhone and Android | Read by scanner apps; many camera apps read only QR |
| Size for the same data | Larger | Smaller |
| Error correction | Choose L, M, Q or H | Fixed, built into each size |
| Quiet zone | 4 cells | 1 cell minimum |
| DoD unique item ID (MIL-STD-130) | Not accepted | Required |
Use a QR code when people will scan it with a phone: websites, manuals, Wi-Fi, contact cards, or commercial part marks a customer asks for.
Use Data Matrix for parts going to the U.S. Department of Defense and most aerospace programs. MIL-STD-130 requires Data Matrix ECC 200 for the machine-readable unique item identifier (UII). It also packs the same data into a smaller square, which helps on small parts. The Data Matrix Generator builds MIL-STD-130 constructs, ISO/IEC 15434 messages and GS1 codes.
Error Correction Levels
| Level | Data that can be rebuilt | Use for |
|---|---|---|
| L | about 7% | Clean screens and paper; smallest code |
| M | about 15% | General use (default) |
| Q | about 25% | Part marks, labels that get dirty or scratched |
| H | about 30% | Logos and banners over the code; harsh conditions |
Percentages from ISO/IEC 18004. Data Matrix ECC 200 has no levels: its correction is fixed for each size.
Higher correction makes the code bigger for the same data, because more of it is spare. On a part with a fixed marking area, that means smaller cells, which are harder to mark and read.
For laser marks, Q is a common choice. It survives scratches and coating wear without growing the code as much as H.
Sizing a Code for a Part
A version 1 QR code is 21 × 21 cells; each version adds 4 cells per side, up to 177 × 177 (version 40). At a 0.020 in (0.51 mm) cell, a 29 × 29 code is 0.580 in (14.7 mm) square, plus the quiet zone. The size readout in step 4 does this math for you.
- Uppercase letters, digits, space and
$ % * + - . / :use QR "alphanumeric" mode, which takes less room than lowercase. - Drop labels you don't need, and use the shortest date format your customer accepts.
- Each extra character can push the code to the next size.
Bigger cells read more reliably. Typical laser marks use cells of about 0.010–0.030 in (0.25–0.75 mm). Below 0.010 in, mark and reader quality matter a lot. These are typical values; your marking spec and reader set the real limit.
Leave clear, unmarked space around the code: 4 cells for QR, at least 1 cell for Data Matrix (more is better on textured metal). Edges, fillets, holes and other markings must stay out of it.
On a cylinder the code wraps around the curve. Keep it small compared with the diameter so the cells don't distort; many marking guides keep the code to a small fraction of the circumference. Check your marking spec.
Calling Out a Code on a Drawing
- Symbol: QR code or Data Matrix ECC 200.
- Method and spec: laser engrave, dot peen, label… per the marking spec (for example AS478, MIL-STD-130).
- Where: a leader to the marking area, ideally with a box sized for the code plus quiet zone.
- Cell size (minimum), error correction (QR) and quiet zone.
- The data, character for character: the format, every separator, and which fields change from part to part.
- Quality: the verification standard and minimum grade, if required (for example ISO/IEC 29158 for direct part marks, or AS9132).
- Finish: any protective coat over the mark.
LASER ENGRAVE QR CODE IN AREA SHOWN PER AS478. CELL SIZE .020 IN [0.51 MM] MIN. ERROR CORRECTION LEVEL Q. QUIET ZONE 4 CELLS MIN. ENCODE: PN:ABC-100 DOM:MM/YYYY MFR:1A2B3 SN:XXXX
LASER ENGRAVE DATA MATRIX ECC 200 IN AREA SHOWN PER MIL-STD-130. ENCODE: [)><RS>12<GS>MFR 1A2B3<GS>PNO ABC-100<GS>SEQ XXXX<RS><EOT> 1 SPACE BETWEEN EACH TEXT ELEMENT IDENTIFIER AND ITS DATA.
Show changing fields as placeholders (XXXX, MM/YYYY) and say where the value comes from,
such as "serial number per router" or "per customer purchase order". Spell out every space: a reader treats
MFR 1A2B3 and MFR1A2B3 as different data. Step 5 above writes a note like these.
Part Number, Serial Number and CAGE Formats
Industrial marks wrap the data so a reader can tell the format and split the fields:
| Piece | Meaning |
|---|---|
[)><RS> | Message header: "fields follow" |
12 or 06 | Format: 12 = text element identifiers, 06 = data identifiers |
<GS> | Between fields (ASCII 29) |
<RS><EOT> | End of format, end of message (ASCII 30, 4) |
RS, GS and EOT are invisible control characters. This page shows them as tags so you can check them.
MFR manufacturer's CAGE code, PNO part number, SEQ serial number within that part
number, SER serial number unique across the enterprise. One space separates each identifier from its data.
MIL-STD-130 construct 2 uses MFR + PNO + SEQ; construct 1 uses MFR + SER.
17V CAGE code, 1P part number, S serial number. No space between identifier and data.
The 5-character Commercial and Government Entity code identifies the manufacturer. Look it up in SAM.gov or the DLA CAGE system.
Simple PN:… SN:… strings are fine for internal tracking and phone scanning, but they are not a standard format.
Spell the exact layout out on the drawing.
Laser Engraving Tips
- Dark or light marks. On bare steel or titanium the laser usually darkens the surface: engrave the dark cells. On anodized or painted parts it usually removes the coating and makes a light mark: pick Light cells + quiet zone so the code still reads dark-on-light. Most readers also read inverted (light-on-dark) codes.
- Plain squares. Turn on laser mode. Rounded cells, dots, logos and banners lower the read rate on metal.
- Beam width. A laser line has width, so filled cells grow. Use Shrink each cell with one square per cell, or set the fill offset in your laser software.
- Merged outlines make the fewest, closed shapes. Fill them in the laser software (hatch fill).
- Contrast is what readers need. Test marks on scrap of the same material and finish.
- Verify. A phone reading the mark is a quick check, not a grade. Where the drawing calls for a grade, use a verifier to ISO/IEC 29158 (direct part marks) or ISO/IEC 15415.
- Coating over the mark can lower contrast. Test after coating, not before.
Logos, Banners, Colors and Styles
A logo or banner works because error correction rebuilds the cells it covers. Keep the covered area well under the level's limit: about 30% for H. This page clears the cells under the logo, which reads better than drawing over them.
The three big corner squares (finder patterns) let a scanner find the code. Style them, but never cover them.
- Contrast: dark code on a light background. Light-on-dark and low-contrast colors fail on some phones.
- Gradients: keep both ends dark.
- Transparent background: only on a light surface.
- Always test with the scan check here and with a phone or two before printing.
- Logo file: a square PNG or SVG with a transparent background works best. The Image Converter turns HEIC, WebP or BMP logos into PNG.
Putting the Code in CAD
The DXF is AutoCAD R12 format, which every CAD and laser program reads. Coordinates are in the units you picked, with
the lower-left corner of the quiet zone at 0,0. Layers: QR_ENGRAVE (the cells), QR_SYMBOL_EDGE and
QR_QUIET_ZONE (reference boxes you can hide or delete).
SolidWorks: File → Open the DXF and choose to import it as a 2D sketch in a new part, or open a part sketch and use Insert → DXF/DWG. Set the import units to match the file. AutoCAD: open the file, or attach or insert it into your drawing.
DWG is Autodesk's closed format, and no free software can write it reliably in a browser. Every program that opens DWG also opens DXF; save it as DWG from there if you need to.
The CAD SVG is sized in real inches or millimeters, so Inkscape, Illustrator and laser software place it at true size. PDF and EPS are vector too, for drawing packages and print shops. The plain SVG button keeps your colors and logo.
Free, Private, and It Never Expires
The code is made in your browser. What you type, your logo and any picture you read are never sent anywhere. KasperCalc does not own any servers: the site is a set of fixed files delivered by Cloudflare.
To check, open your browser's developer tools (F12, or right-click → Inspect), pick the Network tab and
make a code. The only requests are this page's own scripts. Entries starting with blob: or data:
are the browser reading its own memory.
These are static codes: the text is inside the code itself, so it works forever without any service. Some websites make "dynamic" codes that point to their own short link, so they can count scans, and the code stops working if you stop paying.
Sources and Software
ISO/IEC 18004 (QR Code); ISO/IEC 16022 (Data Matrix); ISO/IEC 15434 (syntax for high-capacity media); ANSI MH10.8.2 (data identifiers); ATA Spec 2000 (text element identifiers); MIL-STD-130 (identification marking of U.S. military property); SAE AS478 (identification marking methods); SAE AS9132 (Data Matrix quality requirements for parts marking); ISO/IEC 29158 (direct part mark quality); ISO/IEC 15415 (2D symbol print quality); RFC 2426 (vCard 3.0); RFC 5545 (iCalendar).
QR codes: QR Code generator library
by Project Nayuki (MIT). Data Matrix codes and the scan check:
zxing-wasm 3.1.8 (MIT), built on
zxing-cpp (Apache-2.0); it loads the first
time it's needed. Licenses are next to each file in js/vendor/qr/. Styling, DXF, SVG, PDF and EPS output are
KasperCalc's own code.