Skip to content
3DToolBench

Convert SVG to DXF

Both are flat drawings, so nothing about the shape has to change. What changes is what the file states: an SVG implies its size through a viewBox, and a DXF states its unit outright. That one difference is why cutting software prefers a DXF, and it is most of what this conversion is for.

Drag a 3D file here, or.

This page is set up for SVG files. Other formats we can read work here too.

The file is read on your own computer. It is never uploaded.

Add a file to switch this on.

Your file is read by your own browser and never sent to a server. There is no upload, no account and no copy of your model anywhere but on your computer.

The size problem this fixes

An SVG states its size in a header — `width="100mm"` — and its coordinates in a viewBox that is usually measured in CSS pixels, ninety-six to the inch. Read the coordinates and ignore the header and the drawing comes out about four times too small. A surprising amount of software does exactly that.

This converter reads both, works out what one unit really means, and writes a DXF with an explicit unit in its header. After that there is nothing left to misinterpret: your CAM software opens the drawing at the size you drew it.

Check it anyway. The width and depth figures beside the preview are the real millimetres, and comparing one of them against the part you have in mind takes five seconds.

Curves become arcs and line segments

SVG draws with Bézier curves. DXF has no Bézier. So every curve is flattened into straight segments, finely enough that a laser cutter follows a smooth edge and coarsely enough that the file does not become a megabyte of coordinates.

For cutting this makes no practical difference — the beam has a width of its own, and the segments are far finer than the kerf. For a drawing you intend to keep editing as curves, keep the SVG as your master and treat the DXF as the output.

Strokes are not outlines

This catches people out often enough to be worth stating plainly. In an SVG, a stroke is a drawing instruction: "follow this path with a pen 2 mm wide". The path itself is a line with no area.

A cutting machine also follows a path, so a stroked path converts exactly as you would expect. But if what you wanted was the *outline of the stroke* — the two edges of that 2 mm band, as a shape to cut out — that is a different operation, and you need to do it in your drawing program first. In Inkscape it is Path → Stroke to Path; in Illustrator, Object → Path → Outline Stroke.

Text has to become paths first

A `<text>` element asks for letters in a font, and the font is not in the file. There is nothing there to cut. Convert the text to outlines in your drawing program before exporting — Path → Object to Path in Inkscape, Type → Create Outlines in Illustrator — and the letters become real shapes that convert like anything else.

If you are only after lettering, the text to STL tool on this site does the same job from typed words, and can give you a DXF straight out.

What survives, and what does not

Kept in the DXF file

  • Every path, at its true real-world size
  • Holes and nested shapes, as separate closed paths
  • A stated unit in the DXF header, which the SVG only implied

Lost on the way

  • Bézier curves, which become fine straight segments
  • Fill colours, stroke widths and styles — a cut has none of these
  • Text that has not been converted to paths

How to convert SVG to DXF

  1. Convert any text to paths first

    In the program that made the SVG. A font cannot travel in the file, so lettering that is still text will not appear.

  2. Drop the .svg file in

    The drawing is read and shown. The message underneath says whether the file stated a real size or was read at 96 pixels to the inch.

  3. Check the width and depth

    They are shown in millimetres beside the preview. If they are wrong, the scale box corrects them before anything is written.

  4. Choose the output unit

    Whatever your cutting software works in. It is written into the DXF header as a statement rather than left to be assumed.

  5. Download and measure one dimension in your CAM software

    The check that makes the difference between a cut part and a wasted sheet.

SVG and DXF compared

SVG and DXF compared, row by row
PropertySVG.svgDXF.dxf
File contentsXML. A text description of shapes, readable and editable by hand.Plain text in numbered group codes, with a binary variant nobody uses.
GeometryFlat paths: lines, arcs, and cubic and quadratic Bézier curves.Lines, arcs, circles, polylines and splines, in 2D and limited 3D.
UnitsReal units are allowed — mm, cm, in — but most files use bare user units.Recorded in a header variable, as one of twenty-odd unit codes.
Colour and textureFills, strokes, gradients and patterns, none of which describe a solid.A colour number per entity, and colour by layer.
Separate objectsGroups and layers, with ids and names on both.Named layers, plus blocks for repeated geometry.
Published byThe W3C, 1999. Version 1.1 is what tools write; SVG 2 is still arriving.Autodesk, 1982, as the published counterpart to the closed DWG.
Written byIllustrator, Inkscape, Affinity Designer, Figma and every drawing program.AutoCAD, LibreCAD, QCAD, Fusion 360 and every laser cutter’s software.

Questions

Why does my drawing come out four times too small elsewhere?
Because the other tool read the viewBox numbers and ignored the width and height in the header. An SVG whose header says 100 mm and whose viewBox spans 378 units is a 100 mm drawing; reading 378 as millimetres gives you something 3.78 times too large, and the reverse mistake gives you something too small. This converter reads both.
My stroked lines disappeared.
An open path has no area. If the line was meant to be a cut path it converts fine; if it was meant to be a shape, use Stroke to Path in Inkscape or Outline Stroke in Illustrator to turn the band into a real outline first.
Which does my laser cutter prefer?
DXF, usually, because it states its units. LightBurn reads both happily; older machine controllers often take DXF only.
Can I go the other way, DXF to SVG?
Yes, and there is a page for it. It is useful when you have a machining drawing and want it in a program that only reads vector graphics.

Where to go next