DWG is AutoCAD’s own format and DXF the one CAD programs use to swap drawings: floor plans from an architect, parts for a laser cutter or CNC router, site plans, exports from AutoCAD, LibreCAD, SolidWorks and Fusion. This opens either and draws it - lines, arcs, circles, polylines, splines, text, dimensions, leaders, hatches and blocks, in the drawing’s own colours, linetypes and lineweights - with pan and zoom, a list of layers to switch on and off, and a measuring tool that snaps to corners and ends.
A DWG is first converted to DXF in the page by LibreDWG, the GNU project’s DWG reader, compiled to WebAssembly; the converter (about 10 MB) downloads the first time, and the converted DXF can be saved. Hatches are drawn with their own pattern lines (brick, ANSI31, earth and the rest), clipped to their outline with islands left empty. Besides the model, each paper-space layout (the sheets a drawing is printed on) has its own tab, in the drawing’s tab order, with its viewports showing the model at their scale.
- Can it convert a DWG to DXF?
- Yes. Open the DWG and a .dxf button appears next to PNG and SVG; it saves the converted drawing, with its layers in the same on, off and frozen states as the original, ready for LibreCAD, a laser cutter’s software or any other program that reads DXF. DWG to DXF opens with that saving first.
- How can I open a DWG file without AutoCAD?
- Drop it on this page: it reads DWG files from AutoCAD R14 to 2018 and later in the browser, with nothing to install, and you can switch layers, measure and print it. Free desktop alternatives are Autodesk's own DWG TrueView (Windows only, a large download) and ODA's Viewer; the web Autodesk Viewer needs an account and uploads the file. To edit a drawing rather than look at it, LibreCAD (for DXF) or a CAD program is needed; save a DWG as DXF here first to open it in LibreCAD.
- Can I print a DWG or save it as a PDF?
- Yes. Press PDF…, choose the paper (A4 to A0, US sizes and ANSI and Arch sheets), the orientation and margin, and either Fit or a scale such as 1:100 or 1/4" = 1'-0"; at a scale, a length on paper comes out exactly that fraction of the real one, worked out from the units the drawing is saved in (or the units you choose when it does not say). If the drawing will not fit the paper at that scale, the page says how big it would be instead of shrinking it. A layout tab prints whole at full size (1:1) on the paper its page setup names; its page setup’s own plot scale and plot area are not read. The PDF is sharp vector lines, in colour, grey or black and white, with or without lineweights, and can hold every tab at once. DWG to PDF opens with these options first. One limit: the PDF’s built-in font has Western European letters only, so a page with text in other scripts (Greek, Cyrillic, Chinese and so on) goes in as a picture 4,000 pixels across instead of lines, still at the right size and scale but not as crisp when zoomed in.
- Can I search a drawing for a room name or part number?
- Yes. Type in Find text beside the drawing: it looks through every TEXT and MTEXT, block attribute (title block fields, tags), table cell and leader label, in the model and on every layout, ignoring capitals and extra spaces. Click a match to go to its tab and zoom to it with the text outlined. It finds text as the file stores it, so words drawn as lines, or inside a picture or PDF underlay, cannot be found.
- How accurate is the measuring tool?
- As accurate as the drawing: when a click lands within a few pixels of a corner or an end it snaps to that exact point, and the distance is worked out from the coordinates in the file. Areas are worked out the same way; a circle’s area comes from its radius exactly, while other curves (arcs in polylines, ellipses, splines) are measured along the short straight pieces they are drawn with, within about 0.1%. A hatch with thousands of loops can have too many to work out which are holes; its area is then shown as “about”, with each loop counted as area, and an outer or ignore island style is filled as normal. On a layout, a measurement inside one viewport is in the model’s units; anything else is in the sheet’s millimetres or inches. The units come from the drawing’s own setting, so a file saved without one shows plain numbers.
- Why does the drawing look different from AutoCAD?
- Mainly fonts. Text is drawn in a standard sans-serif rather than the drawing’s SHX fonts, so lettering can be slightly wider or narrower. Hatch patterns are drawn from the lines stored in the drawing, but a pattern so fine it would take more than 20,000 lines in one hatch (or 400,000 in the whole drawing), or with a boundary so detailed that cutting the pattern to it would take too long, is shown as a light tint of its colour instead, and the page says how many. Leader arrowheads are drawn as closed filled arrows, dots, ticks or open arrows; other custom arrowhead blocks show as the closed filled arrow. Geometry, layers, colours and linetypes follow the file.
- Is the drawing sent to a server?
- No. The file is read, converted and drawn by the page itself - the DWG converter is downloaded to your browser, not your drawing to a server - which matters for drawings of someone’s house, or a part that is not public yet.
- Why is the source code of this viewer published?
- The DWG converter, LibreDWG, is licensed under the GNU GPL, which asks that software built with it shares its own source on the same terms. So the viewer’s code is published under GPL-3.0 at /source/dxf-viewer/ on this site, and anyone may read, change or reuse it.