If you have ever tried to get a logo onto a laser cutter or into CAD software, you have met DXF.
DXF is a vector format machines understand — laser cutters, CNC routers, vinyl plotters and most CAD packages read it. A PNG is pixels, so a machine cannot cut it. Somewhere between "I have a picture" and "the machine cuts it", the image has to become outlines.
That conversion is the part that keeps going wrong.
Why another converter
I went looking for one and found three kinds of result:
- Sites that convert, then ask for an email before the download. The conversion is the bait.
- Sites that upload your file to a server and are vague about what happens next. For a hobby logo, fine. For a client's artwork, not fine.
- Sites that are simply broken — the button does nothing, or the DXF imports as something the machine won't cut.
None of this is a hard technical problem. It is a business-model problem: a free converter has to be paid for somehow, and the usual answer is your email address.
So I built one that runs in the browser and asks for nothing.
How it works
The whole pipeline is client-side. The file is read into a canvas and never leaves your machine.
- Grayscale + threshold. Every pixel becomes black or white — DXF has no concept of a gradient, so somewhere you have to decide what is inside the shape and what is outside. Transparent pixels are composited onto white first, otherwise a transparent-background PNG traces as one big rectangle.
- Trace. imagetracerjs (Unlicense) turns the black regions into closed contours made of line and quadratic-curve segments, with the palette pinned to exactly two colours so it can't go hunting for extra ones.
- Flatten and scale. Quadratic segments get subdivided into short lines, everything is scaled to the output width you type in millimetres, and the Y axis is flipped — images count Y downward, CAD counts it upward. Miss that flip and your logo comes out mirrored, which is a fun thing to discover after the cut.
- Write DXF R12 (AC1009), closed POLYLINEs on layer 0. R12 is the oldest flavour of the format, which is exactly why LightBurn, xTool Creative Space, Fusion 360, Inkscape and AutoCAD all import it without arguing.
Three things I learned building it:
- Threshold is the one knob that actually matters. A logo with anti-aliased edges traces either fat or ragged depending on where you cut, and no amount of smoothing downstream fixes a badly chosen threshold. So it's a live slider over the preview, not a setting buried in a dialog.
- Smoothing is a trade, so it's exposed too. Tight tolerance gives you an enormous file; loose tolerance turns circles into polygons you can see.
- Holes have to be their own closed shape. The inner outline of a letter O or a ring is exported separately, because the machine needs to cut it too. It looks like a bug in the preview until you think about what the cutter is doing.
Line art, logos, silhouettes and stencils convert well. Photographs don't, and that's a limit of the format rather than the tool — with soft gradients, a tracer has to invent an edge that was never in the image.
What it costs
Nothing. No signup, no watermark, no daily limit.
There is a $19 Pro tier on the page — batch conversion to a ZIP, centerline mode for engraving and pen plotters, kerf offset, and true arcs and splines instead of short line segments. I want to be straight about it: none of that is built yet. The button says so when you click it. It's there so I can find out whether anyone wants those four things before I spend my weekends writing them. If nobody clicks, I've learned that cheaply.
The free converter is finished and is not a trial of anything.
Try it: https://ideapanner.resuhive.com/png-to-dxf?ref=devto
If you run a laser cutter or a CNC and the output misbehaves on your machine, I'd genuinely like to hear about it. That failure mode is hard to test for without the machine in front of you.
Top comments (0)