What is the DXF file format?
A .dxf file contains project data for an AutoCAD vector drawing; it is similar to the .DWG format but stores data in a more exchange-friendly form. Originally, .dxf files stored data as ASCII text, but binary encoding is also supported. ASCII .dxf files have a well-defined structure and can be opened in any text editor.
The file is organized into named sections:
HEADER- file header containing drawing settings as name-value pairs (including$ACADVER, which identifies the AutoCAD version that wrote the file)CLASSES- definitions for application-defined classes used in theBLOCKS,ENTITIES, andOBJECTSsectionsTABLES- named symbol tables:APPID(application identifiers),BLOCK_RECORD,DIMSTYLE,LAYER,LTYPE(line types),STYLE(text styles),UCS(user coordinate systems),VIEW, andVPORT(viewport configuration)BLOCKS- block definitions that can be referenced as reusable componentsENTITIES- the drawing geometry: lines, arcs, circles, polylines, splines, text, hatches, and dimensionsOBJECTS- non-graphical data such as dictionaries and object linksTHUMBNAILIMAGE- an optional low-resolution preview image embedded in the fileEOF- end-of-file marker
All data in a .dxf file is tagged: every value is preceded by an integer group code (0-1071) that identifies its meaning. Coordinates are stored as dimensionless numbers; the drawing units are set by the $INSUNITS header variable. .dxf files can store both 2D and 3D geometry, making them a popular exchange format for CAD, CNC machining, laser cutting, GIS, and graphics applications.
.dxf (Drawing Exchange Format) was developed by Autodesk in 1982 for AutoCAD 1.0. The specification was not released to the public for many years; it is now published on Autodesk's developer portal. AutoCAD version 10 and later support both ASCII and binary .dxf files. The binary variant is identified by the sentinel string AutoCAD Binary DXF at the start of the file. .dxf files created with the Spatial plugin may be encrypted and cannot be opened by software other than AutoCAD.
Security & safety
RISK: LOWASCII DXF is plain text geometry - no executable code, so opening one is safe; you can even inspect it in a text editor. Practical (non-malware) cautions: very large or high-version DXFs can choke older software, and a DXF export of a sensitive design hands the recipient exact, measurable geometry. As always, verify the real extension of any file claiming to be a '.dxf' from an untrusted source.
Format details
in a nutshellPrograms that open DXF files
Technical details
deep spec| File encoding | ASCII (plain text) or binary; ASCII variant is far more prevalent |
| MIME type | image/vnd.dxf |
| ASCII file identification | Begins with group code 0 on the first line followed by SECTION on the next line; no fixed byte-level magic signature |
| Binary file identification | Begins with the sentinel string "AutoCAD Binary DXF\r\n\x1A\x00" at offset 0 |
| Data model | Tagged key-value pairs; every value is preceded by an integer group code in the range 0-1071 |
| Section structure | HEADER, CLASSES, TABLES, BLOCKS, ENTITIES, OBJECTS, THUMBNAILIMAGE (optional), EOF - in that order |
| Version marker | $ACADVER variable in the HEADER section (e.g., AC1032 = AutoCAD 2018, AC1027 = AutoCAD 2013) |
| Symbol tables | APPID, BLOCK_RECORD, DIMSTYLE, LAYER, LTYPE, STYLE, UCS, VIEW, VPORT |
| Geometry dimensions | Supports both 2D and 3D entities within the same file |
| Coordinate units | Dimensionless numbers; drawing units specified by the $INSUNITS header variable |
| Supported entity types | LINE, ARC, CIRCLE, LWPOLYLINE, SPLINE, ELLIPSE, TEXT, MTEXT, HATCH, DIMENSION, INSERT (block reference), VIEWPORT |
| Character encoding | ASCII in older versions; Unicode supported since AC1021 (AutoCAD 2007) via \U+XXXX escape sequences or direct UTF-8 in recent releases |
| Encryption | Files created with the Spatial plugin may be encrypted, restricting access to AutoCAD only |
| Interoperability | Supported by third-party CAD, GIS, laser-cutter, CNC, and graphics applications as a neutral vendor-exchange format |
| Released | 1982 (AutoCAD 1.0) |
| Open standard | Yes · royalty-free |
| Specification | help.autodesk.com |
DXF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DXF files.