Embed a 3D model on your website

Show a model from your own server on any page with one line of HTML, or send someone a link that opens it in the viewer.

Never uploadedOne line of HTMLSTL, GLB, STEP, OBJ, 3MFFile stays on your serverFree

Loading tool…
3dfiles Pro: big files, STEP export, batches.Pro adds files over 100 MB, unlimited STEP export, fit-to-printer cuts, colour 3MF and big batches. Free for 7 days, or a one-off 7-day pass.
See Pro

How to embed a 3D model

  1. Put the model file somewhere it has a public address: your own site, a GitHub Pages repository, a storage bucket.
  2. Paste that address into the box above and click Update preview.
  3. Choose the background, size and whether the model turns.
  4. Copy the code and paste it into your page, where the model should appear.

What happens when a visitor opens your page

The small frame loads the viewer from 3dfiles.app, and the viewer fetches the model straight from your address into the visitor's browser. The file never passes through our servers. Its address is carried in the part of the link after the #, which browsers do not send to any server, so we do not learn it either.

If the model does not appear: CORS

A browser only lets one site read a file from another site if the server that holds the file allows it. The server has to answer with the header Access-Control-Allow-Origin: *. Whether it does depends on where the file is:

Where the file isWorks?
GitHub Pages, raw.githubusercontent.comYes
Cloudflare R2, Amazon S3, Google Cloud StorageYes, after you add a CORS rule to the bucket
Your own web serverYes, after you add the header for the model folder
Dropbox, Google Drive, OneDrive share linksNo: they serve a web page, not the file

On an Apache server, a file named .htaccess in the model folder with the line Header set Access-Control-Allow-Origin "*" is enough. On nginx: add_header Access-Control-Allow-Origin *;.

Which format to use

GLB is the best choice for a web page: it is compact and keeps colours and textures. STL, OBJ, 3MF and PLY work as they are. STEP works too, but the visitor's browser has to load the CAD engine first, which takes a few seconds; for a product page, convert the STEP to GLB with the STEP to GLB converter and compress it.

A link instead of an embed

Copy a link to the viewer gives an address that opens the same model in the full viewer, with measuring, section view and the parts list. Use it to send a model to a colleague or customer without attaching the file.

Common questions

Is it free?

Yes. The embedded viewer is free and shows a small "3dfiles viewer" link in the corner.

Do you host my model?

No. The file stays where you put it; the viewer loads it from there. If you remove the file, the embed stops showing it.

How big can the file be?

Up to 300 MB, but visitors have to download it, so keep web models small: a few megabytes at most. The GLB compressor helps.

Does it work in WordPress, Shopify, Webflow or Notion?

Anywhere that accepts an HTML iframe: a Custom HTML block in WordPress, a custom liquid or HTML section in Shopify, an Embed element in Webflow. Notion and similar tools accept the link in an embed block.

Can visitors download my model?

The viewer has no download button, but anything a browser can display can also be saved by a determined visitor. Do not embed a file you must keep secret.