CAD Viewer

Open a file, drop it here, paste a URL, or pick a sample. DXF and DWG in 2D. STEP, IGES, STL, OBJ, glTF/GLB, PLY, 3MF, FBX, DAE and 3DS in 3D. Files stay in your browser.

Embed it in your page

<script type="module" src="https://your-cdn/cad-viewer/cad-viewer.js"></script>
<cad-viewer src="https://example.com/part.step" style="height:500px"></cad-viewer>

Keep the vendor/, chunks/, fonts/ folders and acis-wireframe.js next to cad-viewer.js. The viewer finds them from its own URL, so a CDN on another origin works if it sends Access-Control-Allow-Origin: *. Serve .wasm as application/wasm.

const el = CadViewer.create('#holder', { src: 'plan.dwg', theme: 'light', panel: 'closed' });
el.addEventListener('cad-load', e => console.log(e.detail));
el.addEventListener('cad-error', e => console.log(e.detail.message));

As an iframe: <iframe src="https://your-host/index.html?src=https://example.com/part.stl" style="width:100%;height:500px;border:0"></iframe>

AttributeValues
srcURL of a file to open
themeauto, dark, light
toolbarfull, minimal, none
panelauto, open, closed, none
upload, url-inputfalse hides the Open or URL button
proxyPrefix for URLs blocked by CORS, for example https://proxy.example/?u=
units, precisionMeasurement display
asset-baseFolder holding vendor files if not next to the script
samplesJSON array of {group,name,url}