What Is a DXF File? Inside the Format, DXF vs DWG, and Versions
DXF (Drawing Interchange Format, also called Drawing Exchange Format) is the CAD drawing format Autodesk publishes for moving drawings between programs: every line, circle, piece of text and layer is written out as pairs of a number — a group code — and a value.
Why it will not open
- It is not a picture or a PDF. What a DXF holds is numbers: the end points of a line, the centre and radius of a circle, the height of a piece of text. Nothing appears until a program draws them. (The format has room for a preview thumbnail, but it is optional.)
- One extension, two kinds of file. A DXF is normally text, but AutoCAD can also save a binary DXF under the same .dxf extension, and a program that reads only the text form cannot open it.
- Japanese text is stored differently depending on the version: in the code page the file declares (usually Shift_JIS) up to the 2004 format, in UTF-8 from the 2007 format on. Software that assumes one of the two garbles the other.
- The version can be out of reach. DXF changes with AutoCAD releases, and readers state what they support — Inkscape's DXF import, for example, says it handles AutoCAD Release 13 and newer.
How to open it
View it in your browser, nothing to install (this site)
- 1 Drop the .dxf into the DXF viewer on this site and the drawing appears in the page. The file is read on your device and not uploaded.
- 2 Above the drawing it shows the version (for example "DXF 2018 (AC1032)") and the encoding it read the text in (UTF-8, Shift_JIS and so on). Compare them with the notes below to see why another program garbled the file.
- 3 It opens text DXF only; a binary DXF or a DWG is refused with a message saying so. Line weights are not applied. You can save what you see as PNG, and on a computer print the whole drawing or save it as PDF.
Free software that opens and edits it
- 1 LibreCAD: free, open-source (GPLv2) 2D CAD for Windows, macOS and Linux. Its manual says it reads DWG and DXF and writes DXF, SVG, PDF and more.
- 2 Jw_cad: free 2D CAD for Windows 10 and 11. It reads and writes DXF; writing the 2010 format, and reading part of it, arrived in Version 10.01 (June 2025).
- 3 FreeCAD: a free, open-source 3D modeller for Windows, macOS and Linux that also reads and writes DXF. It is built for 3D design, so to only look at a drawing the others are lighter.
- 4 Inkscape: a free vector graphics editor with a DXF import. The import asks which character encoding to use (Shift JIS, UTF-8 and others), so if the Japanese comes out garbled, open it again with the other one.
Viewers from Autodesk
- 1 DWG TrueView: Autodesk's free Windows viewer. It opens DWG and DXF, switches layers on and off, measures distances and prints, including to PDF. It cannot edit the drawing, but its DWG Convert can save a copy in another version.
- 2 Autodesk Viewer: free, in the browser, and lists DXF among its formats. You sign up and upload the file to Autodesk, so unlike the viewer on this site the file leaves your computer.
What is inside, line by line
A text DXF opens in any text editor. It comes in pairs of lines: first a number (the group code), then its value. "0" followed by "SECTION" starts a section, and "2" followed by a name says which one. The sections run HEADER (the drawing's settings and version), CLASSES, TABLES (layers, linetypes, text styles), BLOCKS (definitions of reusable parts), ENTITIES (the lines, circles and text themselves), OBJECTS and an optional THUMBNAILIMAGE, each closed by "0" and "ENDSEC". CLASSES, OBJECTS and THUMBNAILIMAGE exist from R13 on; an R12 DXF has only HEADER, TABLES, BLOCKS and ENTITIES.
Reading the version: AC1009 to AC1032
The version is the value after $ACADVER in the HEADER section. Autodesk's list: AC1009 = R11 and R12, AC1012 = R13, AC1014 = R14, AC1015 = 2000, AC1018 = 2004, AC1021 = 2007, AC1024 = 2010, AC1027 = 2013, AC1032 = 2018. The list in the 2025 edition of Autodesk's DXF reference still ends at AC1032. The viewer on this site shows this value, and the release name, above the drawing.
Why Japanese text garbles
Up to the 2004 format (AC1018) the text is written in the code page named by $DWGCODEPAGE — ANSI_932, Windows' Shift_JIS, for Japanese. Autodesk's reference says that value is set to the system code page when the drawing is created and not maintained afterwards. From the 2007 format (AC1021) the file is UTF-8, yet the $DWGCODEPAGE entry is still written. If it says ANSI_932 and a reader trusts it, the newer file comes out garbled; a reader that assumes UTF-8 does the same to older files.
Binary DXF
AutoCAD's Save As has a binary option that writes DXF in binary, still with the .dxf extension. The file starts with the words "AutoCAD Binary DXF", is about 25 percent smaller than the text form, and keeps the full precision of the coordinates. If a text editor shows mostly unreadable symbols, this is what you have. The viewer on this site does not open it: ask for the drawing saved again as a text (ASCII) DXF.