Skip to content
Find a tool

PNG to DXF Converter

Trace a PNG into vector outlines at the width you set in mm and download a DXF in R12 or R2000.

Free · runs in your browser · nothing is uploaded

Open on Outlinecut

This embed was switched off for this website. Open on Outlinecut

Add this tool to your siteFree embed code, no sign-up. Keep the credit link.

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Optional settings, added to the address after embed=1: &accent=0f6b5c (colour, 3 or 6 hex digits). Other parameters are ignored.

Please keep the credit link below the tool.

To convert a PNG to DXF, the image has to be traced first, because a DXF stores only vector geometry. This converter turns the PNG into black and white shapes, picks the cut-off automatically with Otsu’s method, and writes the shapes as closed polylines in millimetres, in DXF R12 or R2000. You type the real width from 5 to 600 mm and the height follows the picture. Logos, silhouettes, line art, text and stencils give the cleanest results, because they separate neatly into dark and light. The sections below cover which DXF version to pick, what units the file uses, how accurate the outline is and how a transparent background is treated.
Png to dxf example

How to convert a PNG to DXF

  1. Choose your PNG, drop one on the tool or paste one from the clipboard. Try a sample loads a test picture if you only want to see the result first.
  2. Set Width (5 to 600 mm, default 100). The height follows the aspect ratio of the picture. Width is the width of the whole picture, empty margin included; the shapes keep their place inside it, so a logo with a white border comes out narrower than this figure (crop the picture tight if the shapes must be exactly this wide).
  3. Leave Black and white threshold on automatic (0), which uses Otsu’s method. If the trace misses detail or fills in too much, move it between 1 and 255.
  4. Raise Remove specks up to (0 to 40, default 8) to clear stray dots.
  5. Adjust Smoothing (0 to 100, default 50). Higher values give smoother outlines.
  6. Tick Invert if the shapes you need are the light areas rather than the dark ones.
  7. Set Smallest feature (0 to 5 mm, default 0.5) to drop details too small to cut.
  8. Choose a DXF version: R12 (AC1009, widest support) or R2000 (AC1015).
  9. Compare the Original, Result and Overlay views, then click Download DXF. Download SVG and Download PDF are there too.

The preview updates after each change, so alter one setting at a time. The line under the preview shows the size in millimetres, the paths, the nodes and the file size, which helps you spot a trace that is far too heavy for a simple shape.

Which DXF version should I choose?

Choose R12 (AC1009) unless your software asks for the newer format. It is the default and the oldest widely read DXF version, so it opens in the widest range of CAD and cutting programs. R2000 (AC1015) stores each shape as a lightweight polyline and adds handles and tables.

VersionHow shapes are storedPick it when
R12 (AC1009)POLYLINE, VERTEX and SEQEND entitiesYou are unsure, or the software is old or strict
R2000 (AC1015)LWPOLYLINE entities with handles and tablesYour CAD program asks for the newer format

What units does the DXF use?

Millimetres. The header sets $INSUNITS to mm, so the width you type becomes the real width of the drawing in CAD. The Y axis is flipped so the drawing is upright, and layers are named after the fill colour, which gives a black and white trace one layer named COLOR_000000.

Is PNG to DXF conversion accurate?

The size is exact: the drawing is as wide as the Width you typed. The outline is as accurate as the trace. Curves are flattened into short straight segments, and the outline is simplified with a tolerance of half a pixel of the traced copy, which is at most 1,600 pixels on its long side. The table shows what that means in millimetres for a picture that large.

WidthMillimetres per pixelHalf-pixel tolerance
100 mm0.0625about 0.03 mm
300 mm0.1875about 0.09 mm
600 mm0.375about 0.19 mm

A smaller source picture has bigger pixels and a looser fit. Use the Overlay view to check the outline against the original before you cut.

What if the trace fills in or misses detail?

Most problems come from one control. Find the symptom in the table and change only that setting.

What you seeControl to change
Dust or tiny dotsRaise Remove specks up to
Jagged outlinesRaise Smoothing
Tiny fragments next to real shapesRaise Smallest feature
Shapes filled in or mergedLower Black and white threshold
Thin lines missingRaise Black and white threshold

Does a transparent PNG work?

Yes, but transparent areas are treated as white. The tool flattens the picture onto a white background and then traces the dark parts, so black artwork on a transparent background works as expected. White artwork on transparency merges with that white backdrop and is lost, so put it on a dark background before you load it.

Answers to common questions

Can you convert a PNG file to DXF?

Yes. The PNG is traced into black and white shapes, and those shapes are written as closed polylines. Open the DXF in your CAD or cutting software.

Can I use the DXF for laser cutting?

If your laser software imports DXF, yes. LightBurn and xTool Creative Space list DXF import in their documentation, while Glowforge needs a premium plan for DXF. For red hairline cut paths, use the SVG for laser cutting page instead.

Which PNG works best?

Pictures where dark shapes sit on a plain light ground: logos, silhouettes, line art, lettering and stencils. Soft shading and gradients do not separate into clean cut paths.

Can I import the DXF into AutoCAD, Inkscape or SolidWorks?

Those programs read DXF, and the file is in millimetres. Trace here first, then import the DXF and set the unit to millimetres if the import dialog asks. We have not tested each program.

How large can the PNG be?

Your input is not uploaded anywhere, so there is no upload cap. Pictures over 3,000 pixels on the long side are scaled down when loaded, and the trace works at up to 1,600 pixels.

Does the DXF keep colours?

It keeps them as layers. A black and white trace gives one layer, named after its fill colour.