Enclosure Generator: Project Boxes Sized From Your Board
Free enclosure generator for electronics. Enter the board size and its mounting holes, pick a screw, friction or snap lid, add vents and cut-outs for USB-C, HDMI, Ethernet, LEDs or buttons, and download body and lid STL. The live 3D model updates as you type.
- Standoffs at your board holes
- Exploded body and lid view
- Watertight STL, lid print-ready
- Free, built in your browser
Enclosure
Body + lid STLRaspberry Pi 4: 85 × 56 mm, 4 × M2.5 holes, 7 cut-outs placed
Built in your browser. Nothing is uploaded.
Live 3D preview
Raspberry Pi 4Examples
Enclosure generator examples you can open
Five boxes made with this enclosure generator, rendered in its own 3D preview. Open one in the editor to change it, or download the body and lid as STL files.

Raspberry Pi 4
Pi 4 case with a snap lid
The preset places USB-C, both micro-HDMI ports, the audio jack, Ethernet and the two USB stacks. Snap bumps and lid vents, 93 × 64 × 30.6 mm closed.
Snap lid · 7 cut-outs · lid vents · body + lid STL

Raspberry Pi 5
Pi 5 case with side vents
Same 58 × 49 mm holes, Pi 5 connector layout. Side slots skip the wall with the USB and Ethernet openings.
Snap lid · 6 cut-outs · side vents · body + lid STL

Arduino UNO R3
UNO box with a friction lip
Standoffs on the four UNO holes, USB-B and power jack openings on the left wall, extra clearance for the overhanging USB jack.
Friction lip · USB-B and power jack · body + lid STL

Custom board
Small sensor box with mounting tabs
A 50 × 30 mm board on M2 standoffs, Micro-USB and a 3 mm LED in the lid. The enclosure generator adds ears for two M4 screws.
Friction lip · M2 standoffs · M4 tabs · body + lid STL

Screw lid
Project box with heat-set inserts
Corner posts for M3 inserts that stop above the board, USB-C, a 5 mm LED, a 12 mm button and a panel DC jack.
Screw lid · M3 inserts · 4 cut-outs · body + lid STL
How it fits
What the enclosure generator builds around your board
You describe the board; the enclosure generator works out walls, posts and openings for the electronics enclosure, and shows every part in place before you print.

Pi 4: 85 × 56 mm board, 2 mm clearance, 93 × 64 mm outside

Reference
Enclosure generator opening sizes for common parts
Each preset is the connector shell plus about 0.3 mm play per side, so the part slides through without rattling. Plug overmoulds are bigger than the socket.
| Part | Opening | Note |
|---|---|---|
| USB-C | 9.6 × 3.9 mm, R1.6 | Receptacle shell 8.94 × 3.26 mm. Keep the socket at the board edge. |
| Micro-USB | 8.2 × 3.4 mm, R0.8 | Check thick cable overmoulds. |
| USB-A | 13.7 × 6.3 mm, R0.5 | Single socket. |
| USB-A, stacked pair | 15.4 × 16.4 mm, R0.8 | Two sockets in one block, as on Raspberry Pi boards. |
| HDMI | 15.6 × 6.2 mm, R0.8 | Full size type A socket. |
| Micro-HDMI | 7.2 × 3.7 mm, R0.8 | Type D socket of the Pi 4 and Pi 5. |
| RJ45 Ethernet | 16.4 × 13.8 mm, R0.5 | Jack body about 15.9 × 13.2 mm. |
| DC jack, M8 panel | Ø 8.2 mm | Panel jack with an M8 thread and nut. |
| 3.5 mm audio jack | Ø 6.5 mm | Board mounted jack nose. |
| LED 3 mm / 5 mm | Ø 3.2 / Ø 5.2 mm | Press fit for the LED body. |
| Push button 12 mm | Ø 12.2 mm | Panel button with a nut. |
| Toggle switch, M6 | Ø 6.4 mm | Mini toggle with an M6 bushing. |
Printers differ by a few tenths of a millimetre. If a plug will not reach the socket, give that cut-out a larger W and H in the enclosure generator.
How to
How to use the enclosure generator in 3 steps
No install and no account; the enclosure generator runs in this tab.
STEP 1
Describe the board
Pick Raspberry Pi 4, Pi 5 or Arduino UNO, or type the board length and width. Under All settings, add its mounting holes from the lower-left corner.
STEP 2
Choose the lid and openings
Set the free height above the board, choose screws, a friction lip or snap fit, then add vents and cut-outs. The 3D model rebuilds as you go; Exploded shows the lid lifted off.
STEP 3
Download and print
Press Download body + lid for a ZIP, or save each STL from the editor. Print the body open side up and the lid as it comes, flat side on the bed.
Measure twice
Use calipers on the board and the tallest part. Add a millimetre where cables bend or plugs need room.
Test the lid first
Make a small test box in the enclosure generator to check the lip or snap fit on your printer.
Inserts for many openings
Lids you open often last longer on M3 heat-set inserts than on screws cut straight into plastic.
Overhanging jacks
Some jacks stick out past the board edge. Raise the clearance on that side so they reach the opening.
Specs
Enclosure generator specs and limits
What this enclosure generator makes, and what it leaves to you or your CAD program.
- Board
- 10 to 250 mm per side, 0.4 to 3.2 mm thick, up to 12 mounting holes
- Presets
- Raspberry Pi 4 and Pi 5 with connector cut-outs, Arduino UNO R3 holes, custom
- Walls
- Wall, floor and lid 1.2 to 5 mm; corner radius up to 15 mm
- Screws
- M2, M2.5 or M3: self-tapping pilot 1.7 / 2.1 / 2.5 mm or heat-set insert 3.2 / 3.6 / 4.0 mm
- Lid
- Screws on four corner posts, a 4 mm friction lip, or the lip with snap bumps
- Openings
- Up to 16 cut-outs from 15 presets on front, back, sides, lid or bottom
- Vents
- Up to 30 slots in the lid or the side walls, 1.2 to 6 mm wide
- Mounting
- Optional ears with an M4 hole on both short ends
- Output
- Body STL, lid STL turned over for printing, or both in a ZIP; millimetres
- Where it runs
- In your browser, on a Web Worker; nothing is uploaded
It does
- Put standoffs exactly on your board holes
- Keep lid posts and lips clear of the board and its parts
- Leave out vent slots that would cut into a port
- Write closed, manifold STL files a slicer opens without repair
- Show the board, the body and the lid in place, closed or exploded
It does not
- Export STEP or another editable CAD format
- Cut threads, countersinks, text or logos
- Seal against water or dust; there are no gaskets
- Add ribs, hinges, battery holders or wall mounts other than the tabs
- Check that your parts fit under the lid; that is your free height
Next steps
Print the 3D printed enclosure and fit the board
An enclosure generator saves the modelling; the last millimetre is still printing and fitting. Start from a drawing instead? Try the image to CAD converter.

Print body and lid
PLA is fine indoors. Use PETG or ASA near heat and for snap lids, which flex instead of cracking.

Fit the board
Screw the board onto the standoffs, check every plug, then close the lid. If a jack sits tight, raise the clearance in the enclosure generator.

Change it and print again
One number off? The enclosure generator rebuilds the box in about a second, so a second prototype costs minutes, not an evening of CAD.

Document the project box
Need views and dimensions for a quote? This AI-generated example drawing shows the style of the technical drawing generator.
Enclosure generator FAQ
Sizes, lids, screws and printing.
Is this enclosure generator free?
Yes. No sign-up and no limit on boxes. The enclosure generator builds the model on your own computer, so there is no queue.
What size PCB enclosure do I need?
Measure the board, then add a clearance of 2 to 3 mm per side, more where cables bend. For the height, measure the tallest part above the board. Enter those numbers; the enclosure generator adds standoffs, walls, floor and lid.
Can it make a Raspberry Pi case or an Arduino box?
Yes. The enclosure generator has Raspberry Pi 4 and Pi 5 presets: the 85 × 56 mm board, holes 58 × 49 mm apart and every edge connector placed. The Arduino UNO preset puts standoffs on its four holes; add the jack openings yourself.
Which lid should I choose?
Screws hold best and survive many openings. A friction lip needs no hardware but depends on your printer. Snap fit clicks shut and suits PETG or ABS better than PLA. The enclosure generator builds all three.
What hole sizes does the enclosure generator use for screws?
Self-tapping pilots of 1.7, 2.1 and 2.5 mm for M2, M2.5 and M3, or 3.2, 3.6 and 4.0 mm for brass heat-set inserts. Lid holes are the screw size plus 0.4 mm.
Where do I measure cut-out positions from?
From the lower-left corner of the board seen from above, as board drawings do: the distance along that edge, and the centre height above the top face of the board. Lid and bottom openings take X and Y on the board.
Will the corner posts hit my board?
No. The enclosure generator stops lid posts at least half a millimetre above the board, with a 45° slope under them, so the board corners slide underneath. Tall parts in the corners can still touch them; use a lip lid then.
How do I print the enclosure?
Body open side up, lid exactly as downloaded: the enclosure generator turns it flat side down. Neither part needs supports. Use 0.2 mm layers and three walls.
Are the STL files watertight?
Yes. Body and lid are built with the Manifold solid kernel and checked edge by edge; the preview shows Closed mesh: Yes when both pass.
Can I get a STEP or DXF file?
No, the enclosure generator exports STL meshes only. Import the STL into your CAD program as a reference if you need an editable model.
Is my design uploaded?
No. The enclosure generator runs in a Web Worker in this tab and writes the STL there; nothing is sent to a server.
What else can I check before printing?
Open the STL in the STL viewer, or make a matching box for spare parts.
Open the enclosure generator
Pick a board, choose a lid, place the openings and download body and lid STL. Free, right in this tab.
Make an enclosure