Learn · File formats · DXF
What is a DXF file?
A DXF file is a CAD drawing saved in Drawing Exchange Format — an open, text-based format Autodesk published in 1982 so drawings could move between different programs. Nearly every CAD, CAM, and nesting package can read one. If someone sends your shop “the drawing” and it isn’t a PDF, odds are good it’s a DXF.
DXF and DWG describe the same drawing; the difference is the container. DWG is the closed, binary native format — DXF is the open interchange version you hand to somebody running different software. More on that trap below.
Sec. 01 · Who uses it
Where a DXF sits in the workflow
DXF is the handoff format of mechanical work. The people who draw parts and the people who cut parts rarely run the same software — DXF is the bridge both ends agree on.
A typical path: a designer or detailer draws the part in whatever CAD package they run, exports a DXF, and sends it to the shop. The shop imports it into nesting or CAM software, which turns the geometry into toolpaths for a laser, plasma table, waterjet, or router. The same handoff shows up well beyond heavy fabrication — sign making, gasket cutting, CNC woodworking, engraving, even circuit-board outlines.
Because it sits on that boundary, a DXF is usually the last thing checked and the first thing blamed. Most “bad DXF” problems are one of a half-dozen repeat offenders — all covered below, all checkable before anything gets cut.
Sec. 02 · Inside the file
What’s actually in a DXF
Open a DXF in a text editor and the mystery evaporates: it’s pairs of lines, all the way down.
The first line of each pair is a group code — a number that says what the next line means. The second line is the value. That’s the whole trick. A 300 KB DXF is just tens of thousands of these little pairs, organized into six named sections:
| Section | What’s in it |
|---|---|
| HEADER | Drawing settings — including the declared units ($INSUNITS) |
| CLASSES | Internal bookkeeping; safe to ignore |
| TABLES | Layers, linetypes, text styles |
| BLOCKS | Reusable geometry that INSERT entities point at |
| ENTITIES | The drawing itself — lines, arcs, circles, text |
| OBJECTS | Non-graphical data; safe to ignore |
The section your machine software cares about is ENTITIES. Here is one LINE entity from that section, annotated pair by pair:
The entity types you’ll meet most often:
- LINE
- CIRCLE
- ARC
- LWPOLYLINE / POLYLINE
- TEXT / MTEXT
- INSERT (block reference)
- SPLINE
- DIMENSION
Simple shapes — LINE, CIRCLE, ARC, and the polyline family — travel well. The trouble usually starts with the fancier ones: SPLINE curves, INSERT block references, DIMENSION objects. Not every reader on the shop floor draws them the same way, or at all.
Sec. 03 · Field notes
Common DXF problems in the wild
Six repeat offenders cause most DXF grief between the design office and the machine. Every one of them is checkable before anything gets cut.
-
01
The part imports at the wrong size
A DXF declares its units in the header ($INSUNITS) — but that field is often wrong or simply absent, so the receiving program guesses. Classic symptom: a part exactly 25.4× too big or too small, because millimeters were read as inches or vice versa. Check one known dimension against the print before cutting. Every time.
-
02
It’s actually a DWG
Same drawing model, different container: DWG is the closed binary native format, DXF the open interchange. Renaming
.dwgto.dxfconverts nothing — the file is still binary inside. Go back to the CAD program and export a real DXF. Full story — and free conversion paths — in our DWG guide. -
03
Splines the machine won’t take
CAD likes smooth SPLINE curves; plenty of nesting and machine software wants arcs and straight lines only. Symptom: geometry that goes missing or comes in faceted. Fix it upstream — export with splines converted to polylines or arcs.
-
04
Blocks that vanish or pile up at the origin
Repeated details are often stored once in the BLOCKS section and placed by INSERT references. Some importers skip them, or drop every copy at 0,0. If a drawing imports half-empty, explode the blocks in CAD and re-export.
-
05
Z coordinates in a “2D” file
A flat-looking drawing can carry stray Z values left over from a 3D modeling session. 2D CAM software may refuse the file or distort the geometry. Flatten everything to Z=0 before export.
-
06
ASCII vs. binary DXF
Most DXFs are plain text, but a binary variant exists — and plenty of tools only read the text kind. If a reader rejects a file outright, re-export it as ASCII DXF; practically every CAD package offers the option.
Sec. 04 · FAQ
DXF questions, answered plainly
How do I open a DXF file?
The quickest way is a viewer. Our free DXF viewer runs in your browser — drop the file in and the geometry appears, with layers you can toggle. Nothing is uploaded. Any mainstream CAD or CAM package opens DXF too. And because ASCII DXF is plain text, a text editor will technically open it — useful for a peek at the header, not for reading a drawing.
Is DXF the same as DWG?
No — but they describe the same drawing. DWG is the closed, binary format native to Autodesk software; DXF is the open, text-based interchange version. Converting between them is an export/import job inside a CAD program. Renaming the file extension does nothing. Full story — and free conversion paths — in our DWG guide.
Why did my DXF import at the wrong size?
Units, almost certainly. A DXF declares its units in the header ($INSUNITS), but the field is frequently absent or wrong, so the importing program guesses. If a part is off by exactly 25.4×, millimeters were read as inches or vice versa. Verify one known dimension after import, every time — it takes ten seconds and saves plate.
Which is better for laser cutting — DXF or SVG?
Both work, and many machine tools accept both. DXF comes from the CAD world: real-world units and true arcs, which suits parts made to a print. SVG comes from the graphics world and defaults to pixel units, which suits artwork and engraving. Whichever you use, confirm the physical size before cutting — that’s where both formats bite. We have a plain-English SVG guide too.
Can I edit a DXF in a text editor?
Technically yes — it’s text. Practically, don’t: one broken code/value pair, a wrong vertex count, or a dangling reference and the file won’t import anywhere. Small edits belong in CAD. Repetitive edits across a whole folder of files are a job for purpose-built batch tools — that kind of tooling is work we do.
What software creates DXF files?
Practically every CAD package can export one, and practically every nesting or CAM package can import one. That near-universal support is the whole reason the format has survived since 1982 — it’s the closest thing mechanical work has to a common drawing language.
Sec. 05 · See one yourself
The fastest way to understand a DXF is to look at one
Our free DXF viewer runs entirely in your browser. Drop in a file and see the entities drawn, layer by layer — with an honest note about anything it can’t draw.
Nothing is uploaded — there is no server to upload to.
Next up: what is an NC1 file? →
Curious Technologies builds tools that batch-process files like this — checking, converting, and correcting whole job folders at a time. If your shop preps DXFs by hand every week, tell us about it: john@curioustech.org.