How to use it
- Choose or drop a .dxf file (saved as ASCII DXF).
- Check the preview and switch off layers you do not need.
- Pick a background and whether to use line weights or one colour.
- Download the SVG or copy its code.
How it works
The DXF is read with the open-source dxf-parser library and converted to SVG paths in your browser. Supported entities: LINE, LWPOLYLINE and POLYLINE (bulges become true circular arcs), CIRCLE, ARC, ELLIPSE, SPLINE (sampled into short line segments), SOLID and 3DFACE outlines, TEXT and MTEXT (single font, formatting codes removed), INSERT block references with position, scale, rotation and MINSERT arrays, and the blocks that draw DIMENSION entities.
The Y axis is flipped because CAD drawings count upwards while SVG counts downwards, and the SVG view box fits the visible drawing with a small margin. Colours come from the entity, its layer or the inserting block (BYLAYER and BYBLOCK), using the 256-colour AutoCAD Color Index or true colours. Each layer becomes an SVG group, so you can edit layers separately in a vector editor.
Limits: DWG and binary DXF are not read. Paper-space layouts, hatches, images, line types (dashes), 3D solids, meshes and point entities are not drawn; the tool tells you how many entities it skipped. Rational spline weights are ignored. If $INSUNITS is mm, cm or inches, the SVG width and height use that unit; otherwise drawing units are written as plain numbers.
Examples
Laser-cutting outline
A DXF exported from a CAD program with the cut contour on layer CUT and dimensions on DIM: hide DIM and TEXT, choose a transparent background and download an SVG for the laser software.
Floor plan for a web page
An architectural DXF with walls, doors as block references and room labels: keep all layers, use DXF line weights and embed the SVG in a page where it scales without blurring.
Frequently asked questions
Can I convert DWG files?
No. DWG is a closed binary format. In AutoCAD, LibreCAD, DraftSight, FreeCAD or QCAD use Save As or Export and choose DXF (ASCII), then convert that file here.
Why is some text in the wrong font or position?
The SVG uses a generic sans-serif font and the basic alignment of TEXT and MTEXT. CAD fonts (SHX), stacked fractions and paragraph formatting are not reproduced.
Are arcs kept as arcs?
Yes for ARC, CIRCLE and polyline bulges, as long as a block is not scaled differently in X and Y. Ellipses, splines and arcs inside non-uniformly scaled blocks become short straight segments.
Why does my drawing look tiny or far off to one side?
The view box covers every visible entity, so a stray object far away from the drawing makes everything else small. Hide the layer that contains it, or delete it in your CAD program.
Privacy
The DXF file is read and converted in your browser. It is not uploaded or stored, and only an anonymous event that the tool was used is counted.