How to convert an SVG to DXF
- Drop the SVG on the box above, or click Open an SVG. The file is read in this browser tab and never uploaded.
- Check the size under Size of the drawing. When the SVG gives its size in millimetres or inches, the DXF keeps that size at a scale of 1.
- Choose Millimetres or Inches for the DXF. To resize the drawing, type a scale, or type the width you need and the scale follows.
- Click Download DXF.
To try the steps first, click Try a sample. The sample is a flat bracket 120 mm wide, with four holes, a slot turned 30 degrees and a teardrop cut-out.
What the DXF holds
The converter writes ASCII DXF R12, the version that Autodesk's header reference lists as AC1009. The file holds these entities:
- Closed shapes become closed polylines, and circles become CIRCLE entities.
- Arcs stay true arcs. A path arc, a rounded corner or a Bezier curve that follows a circle becomes a polyline segment with a bulge. The DXF reference for VERTEX defines the bulge as the tangent of a quarter of the arc's angle.
- Other curves, such as ellipses and freeform Bezier curves, become short straight segments that stay within 0.01 mm of the curve.
- Layers come from Inkscape layers, or from named groups at the top of the file. Everything else sits on layer 0.
- Colours follow the stroke colour, or the fill colour when a shape has no stroke, as the nearest basic AutoCAD colour. Black keeps the layer colour.
- Units go into the header as $INSUNITS and $MEASUREMENT, so a CAD program that reads those header values opens the drawing at the right size.
The origin of the DXF is the lower-left corner of the SVG page, so drawings taken from one page line up when you open them together. When the SVG sets no page size, the origin is the lower-left corner of the drawing.
How the converter reads the size of an SVG
An SVG places shapes in user units. The root element's width, height and viewBox set the size of a user unit: the viewBox is a rectangle in user units that maps onto the width and height. When those are in millimetres or inches, the size is exact, and a 100 mm square stays 100 mm at a scale of 1.
When the width and height are in pixels, or missing, the converter needs the length of a pixel. CSS defines an inch as 96 pixels, and Inkscape moved from 90 to 96 pixels per inch in version 0.92 to match the CSS standard. Some programs still write one pixel per point, which is 1/72 inch. A thread on Adobe's Illustrator forum traces SVGs that open at 75% of their size in laser software to that difference. If a DXF comes out at three quarters of the size you expect, choose 72 under Pixels per inch.
Before you cut anything, check one dimension that you know against the width shown in the results.
What the converter leaves out
- Text. DXF text uses CAD fonts, not the fonts in the SVG, so text elements are left out and counted. Convert text to paths in your editor first: Object to Path in Inkscape, or Create Outlines in Illustrator.
- Embedded pictures. A bitmap holds pixels, not lines. Trace a picture with the PNG to DXF converter.
- Line width. The DXF holds the centre line of each stroke. A stroke 2 mm wide comes out as one line, not as the outline of the stroke.
- Fills, clipping and masks. A filled shape comes out as the outline of the shape. Clipping paths and masks are not applied, so a shape that they crop comes out whole.
- Hidden shapes. A shape set to display none or visibility hidden, or with neither a stroke nor a fill, is left out.
The converter applies the simple CSS rules in a style element: rules for a tag, a class or an id. Rules with other selectors are ignored, so check the colours of a file that styles shapes in more elaborate ways.
Quote the parts in the drawings customers send
Tell Derik how requests for quote reach your estimators and which files they price from. He will tell you what a four-week build would cover.
Start a conversationFrom a DXF to the price of a cut part
A laser, plasma or waterjet quote starts from two numbers in the DXF: the length of every cut and the number of pierces. The Fabricator's guide to estimating gives cutting time as the cut length over the cutting speed, plus the pierces times the pierce time. Open the DXF in the DXF viewer to get both numbers, the weight of the part and a cutting cost from your own feed rate and shop rate.
An estimator who quotes cut parts every day repeats those steps for each drawing in each request. ThriveAI builds quoting systems that read each request with the drawings attached, measure the parts and draft the quote from the shop's own rates, for an estimator to approve. The AI quoting software offer describes the build.