Should You Use DWG or DXF?

Updated Apr 18, 2017
Use DWG DXF

It can be easy to get confused between DXF and DWG files. After all, they’re both ubiquitous within the CAD industry; both display vector images; both have the same level of quality. So, what are the differences between these vector file types? And which should you use for your next project? In this guide, we’ll explain what sets these two file formats apart—plus when and why to use each of them.

In this guide…


How are DWG and DXF similar?

Both DWG and DXF are vector graphic file formats. Vector images maintain the same image quality at practically any scale, making them perfect for design purposes. It’s also easy to edit the individual elements that form a vector image, as well as adding or removing elements. Typically, the majority of 2D vector drawings will be formed of a combination of:

  • Lines (including dotted lines, dash-dot lines, arrows and polylines)
  • Polygons (including polypolygons)
  • Circles
  • Arcs
  • Bezier curves (including polybeziers)
  • Text

These common features to vector images set them apart from raster images, which are made up of pixels, and are incredibly difficult to edit and almost impossible to accurately scale.

DWG and DXF differ by the type of information they can store and how this is encoded into the file. We’ll go into detail later.

8-2Secondly, both DWG and DXF were designed for use with CAD software. In fact, they were both created by the same company: Autodesk.

CAD is used to produce 2D and 3D drawings, and is an important tool in a wide range of industries, including architecture, engineering, product design, manufacturing, project management and many others.

The data in the DWG and DXF files are instructions to render drawings. This data mathematically describes the object being modelled. Each data point is plotted using Cartesian coordinates, which are the X-Y coordinates on the grid. Every element of the drawing is made up of such points. A CAD package will connect the lines between these points to render the final graphic image. Sophisticated CAD programs can use this data to dynamically generate different views (images) of the model.


What is DWG?

DWG is a proprietary file format used for storing 2D and 3D design data and metadata. It is the native file format for AutoCAD. The acronym DWG stands for Drawing.

Sample DWG Files

Here are some sample DWG files

Autodesk created the DWG format in 1982, at the same time as the first launch of AutoCAD. Subsequently, DWG went on to become the most widely used format for CAD drawings. In 1998, Autodesk estimated that there were 2 billion DWG files in existence; this number has since increased exponentially. DWG files are widely used across a number of different industries, from architecture to video game design.

How to edit DWG files?How to view DWG files?
You can use the following DWG File Editor to view and edit DWG files: 

  • AutoCAD
  • Scan2CAD
  • Some versions of Google Sketchup
  • DraftSight
  • IntelliCAD
  • CorelCAD

Note: This is not a comprehensive list of DWG file editors. 

DWG File Viewer:

  • A360 Viewer (online viewer)
  • DWG TrueViewTM (online viewer)
  • AutoCAD 360 (mobile and web app)
  • Scan2CAD

Note: This is not a comprehensive list of DWG file viewers.

Read our step-by-step guide to viewing DWG files here.


What is DXF?

DXF is a vector graphic file format that stores drawings. The acronym DXF stands for Drawing Exchange Format; the name gives a clue as to its intended purpose: sharing designs across different CAD programs. 

CAD Drawing in DXF File - Engineering, Architecture and Fashion Design Examples

Here are few examples of drawings in DXF file format. It shows how all types of lines, polygons and text can be represented

The DXF file format was created at the same time as DWG (1982) and by the same company – Autodesk. The history of DXF is a practical story. Designers needed to open AutoCAD drawings using non-Autodesk applications. Hence, DXF was developed to provide an exact representation of the graphical data displayed in AutoCAD’s native file format, DWG. The need for collaboration between AutoCAD users and other CAD designers meant that DXF quickly became ubiquitous, and the format became the standard for data exchange between CAD programs.

The importance of this format cannot be understated. Different companies and industries use different CAD programs and systems, each of which may come with its own native file formats and encoding methods. However, despite these specializations, CAD users need to find a way to share their designs with one another. Enter DXF, the lingua franca of the CAD industry. Here are few examples of CAD collaboration and data exchange:

  • An artist sends his drawing to a cutting machine vendor. An artist designs signboards or sculptures using the software that he knows best, such as Adobe Illustrator or Photoshop. This design is then converted to a DXF file using an application like Scan2CAD. Once converted, he’ll send the design off to a cutting machine vendor, who will manufacture the actual product from his sketch. These types of machines are CNC machines, which work with vector drawing files like DXF. These machines use the vector files to generate automatic cutting instructions, bringing the artist’s design to life.
  • An architect collaborates with a structural engineer. An architect may design his floorplan with AutoCAD, using various objects to represent windows, doors and so on. The architect then shares his drawing with an engineer, who uses another program to run finite-element structural analysis. He’d then share this drawing as a DXF file to be processed. After the engineer computes the stresses and displacements, he can then send it back to the architect, who’d modify the deformed design.
  • An interior designer takes a floorplan and visualizes the space in 3D using CAD software. Clients often share notebook sketches or photocopies of the original floor plan. The designer could save some time by simply scanning the sketch and converting it to DXF file format. He could then import the DXF file into CAD software, where he can set the correct scale and perfect his design.
How to edit DXF filesHow to view DXF files?
You can view and edit DXF files using any of the following programs:

  • AutoCAD
  • Scan2CAD
  • Adobe Illustrator
  • Open Office
  • TurboCAD
  • CorelCAD
  • SolidWorks
  • and many more…
If you only need to view (but not edit) a DXF file, you can use any of the following programs:

  • eDrawings Viewer
  • Microsoft DWG Viewer
  • DataViz MacLink Plus

You can create DXF files in quite the same way as any other file, using any CAD program that you’re already familiar with. Just save the drawing as a DXF.


Differences between DXF and DWG

1. DWG files are more compact than DXF

The DWG file format encodes information in 1s and 0s—as opposed to DXF, which uses plain text. As a result, DWGs are usually more compact than DXF. In DXF files, every element of the drawing is spelled out in plain text or ASCII format—containing the full range of alphanumeric characters. As such, each character takes up more bytes. Meanwhile, data in DWG files is encoded as a series of 1s and 0s. As a result, binary files are usually 25% smaller than plain text/ASCII files.

Due to their file specification, complex DXF files can go up to hundreds of MB in size. Take a landscape drawing for example—with more than 100 layers, file transfer can get a little cumbersome. In order to transfer the file, you would need to split the drawing into several files, or compress it. A good rule of thumb to go by is that a regular drawing that’s not too complex should be about 10 MB in size.

2. DWG is a proprietary file format, while DXF is open source

DWG vs DXF - Open vs proprietary software
DXF can be used by almost all CAD software, as well as CNC and GIS software too. This is because it is an open source file format that is free for anyone to use. The full specification for the DXF file format is available online, free of charge. Anyone who wants to write software that can read and write DXF files can do so—provided they have the necessary programming skills, of course!

Meanwhile, the DWG format is proprietary to Autodesk. As such, Autodesk designs, defines and modifies the DWG specification. Not all programs can read DWG, so you may have to conduct some unique maneuvering to view DWG files without AutoCAD. Autodesk also sells a read/write library called RealDWG, for use in non-competitive applications. It’s worth noting, however, that a group called the Open Design Alliance have reverse-engineered the DWG file format—the OpenDWG specification is available online.

3. DWG files can handle more types of drawing data

DWG vs DXF - 3D vs 2D object types
Whilst both DWG and DXF store CAD images, they allow for different types of drawing information. Firstly, early versions of the DXF specification store only 2D images and may also have limits to associating related vector information such as colours and line weights, whilst DWG can handle both 2D and 3D geometry. 

Another key difference between the two formats is that DXF files do not support application-specific information—for example, they do not support AutoCAD’s dynamic blocks. This is a feature specific to AutoCAD, which changes the shape and size of the block depending on a set of rules. Therefore, it is important to be careful not to lose any data when importing and exporting drawings as DXF files.


Should you use DWG or DXF?

Well, it depends on what you’re trying to achieve! A few questions to consider include:

  • What CAD programs are you using to view/edit your drawing file?
  • What file formats do these programs support?
  • Are you sharing the drawing file with any other collaborators? Do they have any requirements regarding the file type?

DWG should be used if your drawing will only be accessed via AutoCAD, or a program that is capable of handling DWG files.

In this case, it is convenient to use the default file format – DWG. In fact, you might lose some data when exporting it to DXF, especially those linked to specialized features. For example, a contractor would use DWG files if he were already taking advantage of Autodesk’s Building Design Suite. This construction-specific CAD package contains all of the tools that the contractor needs. For example, he can coordinate site and workflow planning, as well as calculate cost of labor and materials for different design alternatives. Since the package uses DWG by default, he should stick to DWG. Watch the entire case study here.

DXF should be used if you’re sharing drawings between different CAD or vector based programs.

This is especially so if DWG import and export is not supported by your CAD program. Most CAD applications can open DXF files and reference the included information, but do not have the capability to open a DWG file. For example, an archaeologist would use DXF files since he deals with multiple programs.

As an example, one Scan2CAD user, National Trust volunteer Michael Bennison, uses an MS Access database of X-Y coordinates of plants in the park. This data is then exported as a DXF file. After this takes place, the data can be loaded into a CAD application and the data points can be overlaid onto a map. Click to read more about this fascinating project on our blog.


Click to view our Slideshow:


Scan2CAD is Avia Systems’ market leading software, helping users around the world to convert files with intelligence and edit with precision every day. Download our 14-day free trial to try all of Scan2CAD’s features including conversion tools, image editing and cleaning tools, smart OCR, full PDF support, as well as vector recognition and editing.

Download Scan2CAD Free Trial

scan2cad advert for free trial

Market leading Conversion and Editing Software

Start your unlimited 14 day trial
download your free trial