Blog / Guide
November 3, 2026 · 5 min read
Your SVG looks closed, but your software says it's open

Greg Dlubacz
Design Engineer

Your path probably ends exactly where it starts without saying that it's closed. In an SVG, a shape is closed by the Z command at the end of its path, and landing on the same coordinates isn't the same thing. Some software checks for the command and some checks the geometry, so one program can call a shape closed while the next calls it an open line and refuses to fill it, offset it or pocket it. To fix it, add the Z, or join the two end points in your editor.
The two endings are different things
These two paths draw the same square:
M10 10 L110 10 L110 110 L10 110 L10 10
M10 10 L110 10 L110 110 L10 110 ZThe first is four lines that happen to finish on their starting point. The second is a closed shape. The SVG specification is explicit about it: an open subpath “will not be joined, even when the final coordinate of the last path segment is the initial point of the subpath.”
You can see the difference if you give both a 40-unit stroke. In Chromium and WebKit, the version without Z has a square notch cut out of the corner it starts on, because the two ends are capped rather than joined. Firefox draws that corner solid either way. So the browsers don't even agree with each other, and on a filled shape with no stroke all three look the same, which is why this goes unnoticed until the file reaches a machine.
Who goes by the command, and who by the geometry
We ran both of those paths through the open-source path libraries we could get our hands on, plus a third with a 0.5-unit gap at the end:
| Library | Back at its start, no Z | With Z | 0.5 gap |
|---|---|---|---|
paper.js 0.16 (path.closed) | Open | Closed | Open |
| svg.path 7.1 (has a Close segment) | Open | Closed | Open |
| svgelements 1.9.6 (has a Close segment) | Open | Closed | Open |
svgpathtools 1.8 (isclosed()) | Closed | Closed | Open |
Three go by the command, one by the geometry. svgelements matters more than its name suggests, since it was written by the author of the MeerK40t laser software. Our own SVG to DXF tool also goes by the command, on purpose: a line that ends where it starts stays an open line in the DXF, and the tool tells you how many of those a file has.
What we can't tell you is how LightBurn, xTool Creative Space, Cricut Design Space or Fusion decide, because we don't have them here to test and we haven't found it documented. If yours is flagging a shape that looks closed, this is the first thing to check.
What an open path stops you doing
- Fill. LightBurn's fill “requires the shape to be a closed object”, and it warns you when a shape set to fill isn't.
- Kerf offset. LightBurn's kerf offset “only works with shapes that are closed”. Without it, parts come out undersized by the width of the beam.
- Pockets. Vectric's pocket toolpath asks you to “select the closed vectors you wish to pocket out”.
- Cutting a piece free. An open line still scores. It just doesn't have an inside, so nothing tells the software which side is the part.
Why so many files do this
Tracing software is a common source, and we were one of them. Potrace-style tracers follow a contour until they get back to where they started, and they stop there without writing Z. When we measured our own output in October, across 70 real images and every preset, 453,042 of the 598,639 contours had no Z. Not one of them was open by geometry. Every shape looked fine, and most of them were formally open lines. A logo traced before the fix reads as 0 closed shapes and 101 open lines in our SVG to DXF tool. Add the Zs and the same file reads as 101 closed shapes and none open.
We fixed that on 28 October: every contour in a new Tracer SVG now ends with Z. Files traced before then stay as they are. If you have any, trace the image again or close them as below.
How to check a file, and fix it
The quick check. An SVG is text, so open it in a text editor and look at the path data. Every shape starts with M or m. If the file has a lot of those and few or no Z or z, you've found it. In LightBurn, Edit > Select Open Shapes shows you what it considers open.
The fix depends on whether there's a gap. The LightBurn commands below come from its forum, not from our own testing.
- No gap, just no `Z`: add a
Zbefore the nextMor at the end of the path. The shape doesn't move, because the closing line has no length to draw. - In Illustrator: select the two end points and use Object > Path > Join.
- In Inkscape: with the node tool, select the two end nodes and press Shift+J.
- In LightBurn: Edit > Close Paths, or Auto-Join (Alt+J) for pieces that belong together. Check the result, since joining can link pieces you meant to keep apart.
Be careful with Z on a real gap. It draws a straight line across whatever is missing, so on a 0.5-unit gap it's harmless and on a 20-unit gap it's a new edge you didn't design.
Try it on your file
You know what to look for.
Now check your own image.
Upload it and compare the vector with the original before you download anything. SVG export is free.