How to remove duplicate lines from a DXF file (without AutoCAD)
Your DXF contains lines stacked on top of each other. Maybe your laser cuts every contour twice, maybe a downstream tool reports twice the geometry it should, maybe the file is simply bloated for what the drawing shows. On screen everything looks fine — yet the file carries geometry it doesn't need, and every machine and tool downstream pays for it. This guide shows how to tell, where the duplicates come from, how the usual desktop tools handle them (and where they stop), and how to remove them for good — directly in your browser, no CAD licence required.
How to tell your DXF has duplicate lines
Duplicates are invisible on screen: two identical segments render as a single line, even at maximum zoom. You detect them by their side effects, not by looking:
- Your laser or plotter software reports a cut length far greater than the drawing suggests. A total path length roughly double the expected value is the clearest sign.
- The machine visibly retraces some contours (or all of them), burning edges and doubling the job time.
- A "delete duplicates" command finds hits where you expected none — run it once and it reports removing dozens or hundreds of objects.
- The file is unexpectedly large for how simple the drawing is — stacked geometry and micro-segments add entities that carry no visible information.
If any of these ring true, the file almost certainly carries redundant geometry that needs removing.
Where do the duplicate lines come from?
Duplicates are almost never drawn on purpose. They are artifacts of how the file was produced:
- Paste-in-place and stacked blocks (AutoCAD and DWG-based CAD) — pasting geometry at its original coordinates, or inserting a block over lines that are already there, silently stacks one copy on another.
- Fill-plus-stroke and overlapping layers (Illustrator, Inkscape, CorelDRAW) — a shape carrying both a fill and a stroke, or paths that overlap across layers, exports each edge more than once.
- 3D-to-2D projection and image tracing — a projected view (or a raster traced to vector) produces two contours a few microns apart. These are near-duplicates, not exact copies — precisely what the strict tools miss.
- Adjacent parts sharing an edge — nesting two parts hard against each other leaves two cut lines on the shared border, so the laser cuts it twice.
About Revit
Contrary to a common assumption, Revit does not duplicate lines by default — it does the opposite. Because many Revit elements share a plane, the drawing is full of coincident lines; on DWG/DXF export, Revit does not preserve them by default and strips them out (Autodesk's export documentation confirms this). Doubled lines in a Revit export therefore come from a deliberate choice, not from the format: the export setup's "Preserve coincident lines" option, which keeps the overlapping lines instead of removing them. So if a Revit DWG shows double lines, the first thing to check is that setting — but cleaning the exported file catches whatever still slips through, whichever CAD it came from.
The tools that can remove them — and where each stops
If you own a desktop CAD or laser program, it probably does part of the job. None does all of it, and each has a real blind spot — the capable ones cost a licence, and the free ones have no reliable one-click tool at all:
- AutoCAD has a command built for exactly this —
OVERKILL(also in AutoCAD LT). It is one of the most thorough: it removes exact duplicates as well as overlapping lines, arcs and polylines, and can combine partially-overlapping collinear lines into one. The catches: it needs an AutoCAD subscription, and its tolerance requires care to set (more on that below). - Rhino —
SelDup/SelDupAllselects duplicate curves to delete, but only perfect ones: two curves a micron apart — the typical output of a projection or an image trace — escape it entirely, and it does nothing for a long line covered by several short ones. - LightBurn — Delete Duplicates (Alt+D) removes duplicated objects, but only when they are ungrouped and strictly identical in size, shape and position. A duplicate inside a group, a near-duplicate off by a hundredth of a millimetre, or a partial overlap all slip through.
- LibreCAD / QCAD, Illustrator / Inkscape — no reliable one-click equivalent. You end up hunting through the layer tree and deleting suspect geometry by hand.
Whatever the tool, the duplicates return on the next export — they originate upstream, not in your editing.
The hard part: what counts as "the same line"?
Deleting exact copies is easy — every tool does it. The hard part is deciding what to do when two segments differ by a tiny amount:
- Too strict, and you miss the near-duplicates that image tracing and 3D-to-2D projection produce — two contours a few microns apart that the machine still cuts twice.
- Too loose, and you merge or delete geometry that was genuinely distinct — a thin slot, a kerf-width gap, two parallel lines meant to stay two lines.
This is a real limit, not a hypothetical one — the same one AutoCAD users hit with OVERKILL's tolerance and Rhino users hit with SelDup. Any tool working to a fixed tolerance walks straight past lines whose endpoints differ by a few thousandths of a millimetre unless you widen it — and widen it too far and it starts merging things you meant to keep. Without seeing what a given setting removes before you commit, you are guessing, and a wrong guess silently corrupts the part.
Remove duplicate lines online, with Razoar
Razoar is a browser-based DXF cleaner that removes duplicate and overlapping lines without a CAD licence and without uploading your file anywhere:
- Drop your file into the app — no signup required for the preview.
- The live preview highlights exactly which segments will be removed, overlaid on your drawing, so you see the result of the current tolerance before committing to anything. This takes the guesswork out of the tolerance: you adjust the slider and watch what disappears in real time.
- Razoar removes exact duplicates, detects partial overlaps (a short segment sitting on a longer one) and near-duplicates from tracing or projection, and merges collinear segments into a single line.
- Export the cleaned file and send it to your laser, CNC, or plotter.
Because Razoar rewrites the file itself, the problem does not come back when you reopen or share it — unlike a deduplication done at cut time inside the laser software, which leaves the source file dirty.
Your file never leaves your browser: the cleaning runs locally via WebAssembly, so confidential drawings stay on your machine — no upload, no server, no account needed to preview.
How the options compare
| AutoCAD OVERKILL | Rhino SelDup | LightBurn Delete Duplicates | Razoar | |
|---|---|---|---|---|
| Needs a paid licence | Yes (AutoCAD / LT) | Yes (Rhino) | Yes (LightBurn) | No |
| Runs online, nothing to install | No | No | No | Yes |
| Shows what will be removed first | No | Partial (selects only) | No | Yes (live preview) |
| Catches near-duplicates (traces, projections) | With tolerance tuning | No | No | Yes (tolerance you control and see) |
| Removes partial overlaps | Yes | No | No | Yes |
| Merges collinear segments | Yes | No | No | Yes |
| Fixes the file (not just the cut) | Yes | Yes | Yes | Yes |
| File stays private / offline | Yes | Yes | Yes | Yes |
Fix the file, not just the machine
The single most important habit: clean the DXF file, not the machine job. A "remove overlapping lines" toggle in your laser software may skip a redundant pass this once, but the source file stays dirty — and the problem returns the moment you reopen it, re-export it, or hand it to someone else. Cleaning the file upstream fixes it for every downstream tool, permanently.
If your specific symptom is a laser retracing contours, see our companion guide: Why does my laser cut the same line twice?
Remove the duplicates from your file →
More questions? See the FAQ.
Sources
- Autodesk — Exporting Models with Lines that Coincide (Revit): coincident lines are not preserved by default on DWG/DXF export.
- Autodesk — Delete Duplicate Objects (OVERKILL) dialog (AutoCAD LT): removes duplicate and overlapping geometry, with a numeric tolerance.
- McNeel — How to remove nearly duplicate curves/lines (Rhino forum):
SelDupmatches strict duplicates only, not near-duplicates. - LightBurn — Delete Duplicates: objects must be ungrouped and identical in size, shape and position.