DWG vs DXF vs PDF: what's the difference?
DWG is AutoCAD's own drawing format, DXF is the open exchange version of the same drawing, and PDF is a picture of the sheet. Here is what each keeps, what each loses, and how to convert between them.
Updated
Short answer: DWG is AutoCAD's native drawing file. DXF is the same kind of drawing written in Autodesk's open exchange format, so almost every CAD program can read it. PDF is a page for viewing and printing: it may contain sharp vector lines, but it is not a CAD drawing, and a scanned PDF is just a picture.
The three formats at a glance
| DWG | DXF | ||
|---|---|---|---|
| What it is | AutoCAD's native drawing file | Drawing Exchange Format, Autodesk's documented exchange file | Portable Document Format, a fixed page for viewing and printing |
| Owner and spec | Autodesk; the format is not officially published | Autodesk; the reference is published | Adobe originally, now the open standard ISO 32000 |
| How it is stored | Compact binary | Usually plain text (a binary variant exists); larger files | Binary page description |
| Editable in CAD | Yes | Yes | Only after import (vector PDFs) or tracing (scanned PDFs) |
| Layers | Yes | Yes | Optional, if the exporter wrote them; they become plain layer names on import |
| Real units and scale | Yes, drawing units | Yes, drawing units | Only a print scale on the page |
| Typical use | Working files between AutoCAD users | Moving drawings between programs, CNC, laser cutting | Sharing, printing, review and markup |
DWG: AutoCAD's working file
DWG is what AutoCAD saves by default. It stores every object in the drawing (lines, polylines, arcs, hatches, text, dimensions, blocks, layers, layouts) in a compact binary form. Autodesk does not publish the format; other CAD programs such as BricsCAD and DraftSight read and write it through libraries from the Open Design Alliance, which has worked out the format over many years.
DWG also has versions. AutoCAD changes the file format every few releases (the 2004, 2007, 2010, 2013 and 2018 formats are the ones you will meet), and an older AutoCAD cannot open a newer DWG. When someone says "save it down to 2013", that is what they mean.
DXF: the same drawing, in the open
Autodesk introduced DXF in 1982, with the first version of AutoCAD, so that other programs could exchange drawings with it. The format is documented, usually stored as readable text, and supported by practically every 2D CAD, CAM and vector program. The trade-off is size: a DXF is several times larger than the same drawing saved as DWG.
For a floor plan, DXF keeps everything that matters: wall polylines, arcs, text, layers, colours and units. Open it in AutoCAD and use Save As to make it a DWG. To convert many files at once, the free ODA File Converter from the Open Design Alliance converts between DXF and DWG versions in batches.
PDF: a picture of the sheet
A PDF describes a printed page. When you plot a drawing to PDF from CAD, the lines are usually saved as sharp vectors, sometimes with layers, but the CAD meaning is gone: a wall polyline becomes a set of strokes, a block becomes loose lines, text drawn with SHX fonts can turn into tiny line segments, and the only scale is the print scale on the page.
A scanned PDF is different again. It holds a photo of the paper and no lines at all.
How to tell which PDF you have
Zoom in far, to 1,000 % or more. If the lines stay crisp, the PDF contains vectors. If they become blurry or blocky, it is a raster scan. You can also try to select a line or a word: vector content can be selected, a scan cannot.
Converting between them
| From → To | How | What you lose |
|---|---|---|
| DWG → DXF | Save As DXF in AutoCAD, or ODA File Converter | Nothing that matters for a plan |
| DXF → DWG | Open in AutoCAD and Save As DWG, or ODA File Converter | Nothing that matters for a plan |
| DWG or DXF → PDF | Plot or export to PDF | Editable objects; you get a page |
| Vector PDF → DWG | AutoCAD's PDFIMPORT command (AutoCAD 2017 and later) | Blocks, dimensions and polylines come in as simpler lines; you clean up |
| Scanned PDF or image → DWG | Trace it: by hand over an attached image, with AutoCAD's Raster Design toolset, with Scan2CAD, or with an online tracer such as ImageToDWG | Whatever the tracer misreads; check walls, doors and text |
Two points trip people up. First, PDFIMPORT on a scanned PDF only brings the scan in as an image; Autodesk's own support notes say the raster is not turned into geometry. Second, some generic file converters "convert" a JPG or PNG to DWG by embedding the picture in the drawing, which looks like a drawing but has no lines you can edit.
Which one should you use?
- Working with AutoCAD users: DWG, in a version they can open.
- Sending to another CAD program, a CNC machine or a laser cutter, or you are not sure: DXF.
- Someone only needs to look, print or comment: PDF.
- You only have a picture or a scan: none of the above yet. Trace it into DXF first, then save it as DWG.
Where ImageToDWG fits
ImageToDWG is a tracer for the last case. Upload a JPG, PNG or WebP of a floor plan and it returns a DXF with walls as closed polylines on a WALLS layer, door swings on DOORS, centre lines on WALL_AXIS, text read from the image on TEXT and everything else on OTHER. It does not read PDFs yet; for a PDF, export the page as a PNG first, as described on the PDF to DWG page. We make this tool, so weigh our view accordingly, and read the quick facts on the converter page for its limits before you rely on it.
Have a floor plan image to convert?
Upload a JPG, PNG or WebP and check the traced walls for free before you download anything.
Try the converter