What Is a DXF File? A Simple Guide
A DXF file is a computer drawing saved in a format that almost every design program can read. It holds lines, circles, arcs, text and layers. Architects, engineers, sign makers and laser cutting shops use DXF files every day to pass drawings between different programs.
If someone just sent you a DXF and you are not sure what to do with it, this guide is for you. It explains what the format is, what is inside it, where it is used and how to open it, all in plain language.
What does DXF stand for?
DXF stands for Drawing Exchange Format. The key word is exchange. The format exists so that one program can hand a drawing to another program without losing the geometry.
Autodesk created DXF in 1982, alongside the first version of AutoCAD. At the time, there were many CAD programs and none of them could read each other’s files. Autodesk published the DXF format so that other software makers could support it. That decision made DXF the common language of 2D drawings, and it still is today.
What is inside a DXF file?
A DXF file describes a drawing with numbers and short words. It does not store pixels like a photo. Instead, it stores instructions, such as “draw a line from this point to that point” or “draw a circle here with this radius.” This is called vector data.
Because it is vector data, a DXF drawing stays sharp at any zoom level. You can zoom in on a tiny detail and the lines stay crisp. That is very different from a JPG or PNG, which turn blocky when you zoom in.
The things a DXF can store
- Geometry: lines, polylines, circles, arcs, ellipses, splines and points.
- Text: single line text and multi line notes.
- Dimensions: measured distances with arrows and numbers.
- Hatches: filled areas and patterns.
- Layers: named groups that split the drawing into parts, such as walls, doors and notes.
- Blocks: reusable groups of objects, such as a chair or a bolt symbol.
- Colors and line types: how each object should look.
- Settings: drawing units, file version and other details.
DXF files can also hold 3D shapes. Most DXF files are 2D, though. If yours is 3D, read our 3D DXF viewer guide.
How a DXF file is organized
Open a DXF file in a plain text editor, like Notepad, and you will see two lines repeating over and over. The first line is a number called a group code. The second line is a value. The group code tells the program what the value means.
Here is a simple line from a DXF file, from point 0,0 to point 100,50:
0 LINE 8 WALLS 10 0.0 20 0.0 11 100.0 21 50.0
Code 0 starts a new object, here a LINE. Code 8 is the layer name, WALLS. Codes 10 and 20 are the start point X and Y. Codes 11 and 21 are the end point X and Y. That is all a line needs.
The main sections
The whole file is split into sections. Each one has a job.
- HEADER: drawing settings, like units and the version of the file.
- CLASSES: information about special object types in newer files.
- TABLES: lists of layers, line types, text styles and views.
- BLOCKS: the definitions of reusable blocks.
- ENTITIES: the actual drawing, every line, arc, circle and text.
- OBJECTS: extra data used by newer versions of AutoCAD.
You never need to edit this text by hand. But knowing the layout helps you understand why some files fail to open. A cut off file is missing its end. A binary file looks like random symbols. We cover both in DXF file not opening.
ASCII DXF and binary DXF
DXF files come in two flavors. ASCII DXF is plain text, like the example above. It is the most common type, and almost every program reads it. Binary DXF stores the same data in a compact computer code. It is smaller and loads faster, but fewer programs support it.
If you save a DXF for someone else, choose ASCII unless you know their software reads binary. You will be right almost every time.
What are DXF files used for?
Laser cutting, CNC and plasma cutting
This is the biggest use today. Laser cutters, CNC routers, plasma tables and waterjets all read DXF files. The machine follows the lines in the file to cut parts out of wood, acrylic, metal and fabric. Many people meet DXF for the first time when they order a laser cut part. See our list of free DXF files for cutting projects.
Vinyl cutters and crafts
Cricut and Silhouette machines can cut from DXF files. Crafters buy and share DXF patterns for decals, cards and home decor. See DXF files for Cricut and DXF in Silhouette Studio.
Architecture and construction
Architects send floor plans and site plans as DXF so builders and consultants can open them, even without AutoCAD.
Engineering and manufacturing
Engineers use DXF for flat parts, sheet metal patterns, gaskets and panel layouts. Machine shops often ask for a DXF along with a 3D file.
Mapping and surveying
Surveyors export site data as DXF. GIS tools like QGIS can load it as a map layer.
DXF vs other common file types
| Format | What it is | Main use |
|---|---|---|
| DXF | Open 2D and 3D CAD drawing format | Sharing drawings, cutting machines |
| DWG | AutoCAD’s own drawing format | Daily work inside AutoCAD |
| SVG | Web vector graphic | Web images, crafts, design |
| Document format | Printing and sharing finished sheets | |
| STL | 3D mesh | 3D printing |
| STEP | 3D solid model | Engineering and machining |
The most common question is how DXF compares to DWG. Read DXF vs DWG for the full answer.
Pros and cons of the DXF format
Pros
- Opens in almost every CAD, design and cutting program.
- The format is public and well documented.
- Stays sharp at any size because it is vector data.
- Text DXF files can be read and checked by a person.
- Free tools can open and edit it.
Cons
- Files are larger than DWG for the same drawing.
- Some advanced AutoCAD features do not carry over to other programs.
- Units are not always saved, which can cause scale mix ups.
- It is not the best choice for complex 3D models.
A short history of DXF
When AutoCAD first came out, computers were slow and memory was tiny. A text based exchange format was the safest way to move a drawing between programs. Over the years, Autodesk added new object types to DXF each time AutoCAD gained new features. Old versions like R12 are simple and open almost anywhere. Newer versions hold more detail but are a little harder for small programs to read.
That long history is why DXF files from different years can behave differently. If an old cutting program will not read a new file, saving it again as an older DXF version, such as R12 or 2000, often fixes the problem.
How to open a DXF file
The quickest way is our free online DXF viewer. Open it in any browser, pick your file and the drawing appears. Nothing is uploaded, so your file stays private. You can zoom, measure and turn layers on and off.
For a full walk through on each device, read how to open a DXF file. For a list of every program that can read DXF, see what opens DXF files.
How to edit or create a DXF file
To change a DXF, you need a CAD or vector program. Free options include LibreCAD and QCAD for CAD work, and Inkscape for design work. Paid options include AutoCAD and Illustrator. Most of these can also save new drawings as DXF.
How to convert a DXF file
You can convert DXF files to and from many formats. The most common jobs are DWG to DXF, DXF to PDF and SVG to DXF. Start with our guide on how to convert DWG to DXF.
Frequently asked questions
Is a DXF file safe to open?
Yes. A DXF is a drawing file, not a program. It cannot run code on your computer. As always, only open files from people you trust.
Can I open a DXF file on my phone?
Yes. Use a browser based viewer. See our guides for iPhone and Android.
Can I open a DXF without AutoCAD?
Yes. Many free tools read DXF. See view DXF without AutoCAD.
Why is my DXF file so large?
Text DXF files store every number as text, which takes more space. Hatches, splines and 3D meshes also add size. Saving as binary DXF or DWG makes it smaller.
What units does a DXF use?
A DXF can store its units in the header, such as millimeters or inches. Some files leave this blank. Then the numbers are plain drawing units and you need to ask the designer.
See your DXF file now
Now you know what a DXF file is. The next step is to look at yours. Open our free DXF viewer, choose the file and see the drawing in seconds.