How to convert an image to DXF for laser cutting
Updated
A laser cutter follows lines, not pixels. To cut a shape from a picture you need a DXF with closed outlines at the real size. This guide walks through picking the image, preparing it, converting it, and checking the file before you burn any material.
What a laser cutter needs from a DXF
A PNG or JPG is a grid of coloured dots. A laser cutter in cut mode needs vector paths: lines the head can follow from start to finish. A DXF file is the most common way to hand those paths to laser software and CAD tools.
For cutting, a good DXF has three things:
- Closed outlines. Every shape starts and ends at the same point, so the laser cuts a part free instead of leaving a gap.
- Real units. The file says millimetres (or inches) and the shape is the size you want on the material. A logo that comes in at 3,000 mm wide is a common surprise.
- No fills or images. Only the paths. Fills and embedded pictures get ignored or cause errors when you set the layer to cut.
Engraving is different. Most laser software can engrave a raster image directly, so if you only want to engrave a photo you do not need a DXF at all. You need a DXF when you want to cut a shape out, score an outline, or send the part to CNC or CAD.
Step 1: Pick an image that will trace well
Tracing turns the picture into black and white, then draws a line along every edge between the two. The cleaner that split, the cleaner your outline. Images that work best:
- A dark logo on a white background.
- A silhouette (a person, an animal, a tree) filled with one colour.
- A stencil or line drawing with thick, solid strokes.
Photos are harder. They work only when the subject stands out clearly from the background, for example a dark object against a bright sky. If the subject and background have similar tones, the tracer cannot tell them apart and you get noise.
Step 2: Prepare the image (two minutes that save a sheet of plywood)
- Crop tight around the shape. Extra background only adds stray specks.
- Use the largest version you have. A 2,000 px wide image traces far smoother than a 300 px thumbnail.
- Push the contrast up in any photo editor so the shape is close to solid black and the background close to white.
- Remove things you do not want cut: watermarks, shadows, small text you cannot cut cleanly anyway.
- Think about the smallest detail. A laser beam burns away material (the kerf, often around 0.1 to 0.2 mm). Lines thinner than about 1 mm at final size can burn away or snap off in wood and acrylic.
Step 3: Convert the image to DXF
Any tracer follows the same steps. Here they are in the free PNG to DXF converter on this site, which runs in your browser, so the image is never uploaded:
- Drop a PNG, JPG or WEBP file onto the page, or paste it with Ctrl or Cmd + V.
- Move the Threshold slider until the preview shows the shape you want to cut. Lower keeps only the darkest parts; higher pulls in lighter areas.
- If your shape is light on a dark background, tick Invert.
- Raise Smoothing if edges look jagged. Higher smoothing also means fewer points, which makes the file lighter for your laser software.
- Type the real width in millimetres. The height follows the image proportions.
- Download the DXF. Using a Glowforge? Download the SVG instead, since the Glowforge app takes SVG.
The file is DXF R12 with closed polylines on layer 0, in millimetres. R12 is the oldest DXF flavour, which is exactly why almost everything opens it: LightBurn, xTool Creative Space, Fusion 360, Inkscape and AutoCAD.
Step 4: Check the file before you cut
- Import the DXF (in LightBurn: File, Import). Check the width matches what you typed.
- Assign the shapes to a cut layer and look at the preview. Every outline should be one closed loop.
- Look at the holes. The inside of a letter O or a ring is a separate closed shape on purpose, so the laser cuts it out too. If you are making a stencil and want the middle to stay attached, add small bridges by hand.
- Run a test on scrap or cardboard first, especially for small details.
Common problems and how to fix them
| Problem | Likely cause | Fix |
|---|---|---|
| Jagged, stair-step edges | Low resolution image | Use a bigger source image, raise Smoothing |
| Parts of the shape are missing | Threshold too low | Move the slider up until the preview fills in |
| Lots of tiny specks | Noise or texture in the background | Clean the background, lower the threshold |
| Everything is inverted (the background is the shape) | Light shape on dark background | Tick Invert |
| Wrong size in the laser software | Units mismatch on import | Set import units to mm, or re-export with the right width |
| Software is slow with the file | Too many points | Raise Smoothing and export again |
Other ways to do it
You do not have to use a web converter. LightBurn has its own Trace Image tool, and Inkscape (free) has Path, Trace Bitmap, then Save As DXF. Both are good if you already use them and want to edit the paths afterwards. A browser converter is quicker when you just need a clean cut file from one picture, or when you are on a computer without your usual software.
If you have the original vector logo (SVG, AI, EPS or PDF from the designer), use that instead of tracing. Tracing a vector that already exists only loses detail.
Questions
Can I convert a photo to DXF for laser cutting?
Yes, if the subject stands out clearly from the background. Raise the contrast first, then move the threshold until only the shape remains. Busy photos with similar tones trace poorly.
Is the DXF in millimetres or inches?
The converter on this site writes millimetres. Set the real width in mm before you download. If your laser software is set to inches, change its import units to mm.
Why does my DXF have separate shapes for holes?
A laser needs to cut the inside of a letter O or a ring as well as the outside, so the inner outline is its own closed shape. Keep it for cut-outs, or add bridges by hand for stencils.
Does it work with Glowforge?
Glowforge takes SVG rather than DXF, so download the SVG from the same page.