DWG to DXF: how to convert, free and in batch
The fastest DWG to DXF converter you already have is the CAD program the DWG came from, and the fastest free one is ODA File Converter. This viewer converts DWG to DXF on your device to display it, but a DXF download is not offered yet, so here are the five working routes, including batch and command-line options, plus what to check in the DXF.
Which method for which case
| Case | Method | Cost |
|---|---|---|
| One file, you have AutoCAD or BricsCAD | SAVEAS, pick a DXF file type | Included |
| No CAD, Windows only | Autodesk DWG TrueView, DWG Convert | Free |
| No CAD, Windows, macOS, or Linux, whole folders | ODA File Converter | Free |
| Scripts, servers, Linux, Python | LibreDWG dwg2dxf, or ezdxf calling ODA | Free, open source |
| Just need to read or measure it | Open the DWG in a viewer, no conversion | Free |
Online DWG to DXF converters (CloudConvert and similar) also exist. They upload the drawing, which is fine for a sample and wrong for client work; the free tools above run locally.
How to convert DWG to DXF in AutoCAD
- Open the DWG. If it reports missing xrefs or fonts, resolve them first, otherwise the DXF carries the same gaps.
- Type
SAVEAS(or File > Save As). - In "Files of type", pick a DXF entry: AutoCAD 2018 DXF for modern software, AutoCAD 2000 DXF for older tools, AutoCAD R12/LT2 DXF for CNC controllers and old plotters.
- Click Tools > Options in the dialog if you need ASCII versus binary DXF or a decimal-precision setting; ASCII with 16 digits is the default and the safe choice.
- Save. The DWG stays untouched; you now have a second file.
Same steps work in AutoCAD LT and BricsCAD. For many files at once in AutoCAD, use the -EXPORTTOAUTOCAD script approach or the DWG Convert tool described next.
DWG TrueView and ODA File Converter (free)
Autodesk DWG TrueView is free, Windows only, and includes DWG Convert. Add files or folders, create a conversion setup, and choose the output format; the list includes DXF versions alongside DWG versions, so the same tool also solves "dwg to dwg 2007" style downgrades. It is a sizable install, see DWG TrueView alternatives if that matters.
ODA File Converter from the Open Design Alliance is free, runs on Windows, macOS, and Linux, and converts whole folders in one pass. Pick the input folder, the output folder, the output version (R12 through 2018), and DXF as the type; optionally tick "Audit" to repair errors on the way. It also runs headless from a script: ODAFileConverter in_dir out_dir ACAD2018 DXF 0 1. This is the tool to recommend to anyone on Linux or anyone with hundreds of drawings.
Both read every DWG version back to R12 and write every DXF version, which makes them the answer to "dwg to dxf converter free download" without the ad-filled installers.
Command line and Python: LibreDWG and ezdxf
LibreDWG is the open-source DWG library; its dwg2dxf tool converts from the terminal: dwg2dxf -o plan.dxf plan.dwg, with --as r2000 to choose the DXF version. It is packaged for most Linux distributions and builds on macOS; the DWG reading side is mature, so for DWG to DXF it is a good scriptable option. It is also the library this viewer runs in the browser, compiled to WebAssembly.
In Python, ezdxf reads and writes DXF but cannot read DWG on its own. Its ezdxf.addons.odafc module calls an installed ODA File Converter: odafc.convert("plan.dwg", "plan.dxf"), then ezdxf.readfile("plan.dxf") gives you the entities. That pairing covers "convert dwg to dxf python" with two free installs.
What our viewer does with DWG to DXF
When you open a DWG on dwgviewer.app, the file is converted to DXF inside the browser tab (LibreDWG compiled to WebAssembly) and then rendered. Nothing is uploaded, and closing the tab removes the file. A "Download .dxf" button for that converted file is planned but has not shipped, so today the viewer is for viewing, measuring, and exporting PDF, SVG, or PNG, not for producing a DXF.
It still helps in two ways. Before converting, open the DWG to confirm it is really a DWG and which layers it has (see how to open a DWG file). After converting, open the DXF next to the DWG and compare the entity count in the status bar and the layers list; a big difference means something was dropped.
What to check after conversion
- Version. R12 DXF has no lightweight polylines, no true colors, and limited text styles; export R12 only when the receiving device demands it. Details on DWG and DXF versions.
- Xrefs. A DXF stores references by path, not content. Bind xrefs before converting if the DXF travels alone.
- Fonts. SHX fonts are referenced by name; the receiving machine substitutes if it lacks them.
- Size. ASCII DXF is typically three to five times larger than the DWG. That is normal; use binary DXF if size matters and the reader supports it.
DXF and DWG hold the same objects; which one to use for exchange is covered in DXF vs DWG.
Frequently asked questions
How do I convert DWG to DXF?
Open the DWG in AutoCAD, BricsCAD, or DWG TrueView and save it as DXF, or run the free ODA File Converter on the file or the whole folder.
How do I convert DWG to DXF without AutoCAD?
ODA File Converter (Windows, macOS, Linux) and Autodesk DWG TrueView (Windows) are free. On the command line, LibreDWG's dwg2dxf does the job.
Can you convert DWG to DXF for free?
Yes, with ODA File Converter, DWG TrueView, or LibreDWG. All three read every DWG version from R12 up and write any DXF version.
How do I batch convert DWG to DXF?
Point ODA File Converter at a folder (recursive option available) or add a folder in DWG TrueView's DWG Convert. Both process hundreds of files unattended.
Does this viewer convert DWG to DXF?
It converts DWG to DXF on your device to render it, but a DXF download is not offered yet. Use ODA File Converter or TrueView to get the file.
How do I convert DWG to DXF in Python?
Install ODA File Converter and use ezdxf.addons.odafc.convert(); ezdxf then reads the DXF. Pure-Python DWG reading is not available.
Which DXF version should I choose?
AutoCAD 2018 DXF unless the receiving program says otherwise. Pick R2000 for older software and R12 only for CNC controllers that require it.