Skip to content
3D PRINTEROn Demand

3D Printed Enclosures for Electronics and Small Runs

By the 3D Printer on Demand team · Updated October 2026

A 3D printed enclosure is a plastic box that holds and protects electronics, built layer by layer with FDM printing. Companies use them for sensor housings, control boxes, and small device cases. The design work is what decides whether the box actually works. Get four things right and the rest is easy: wall thickness, how the lid closes, where the ports come out, and which plastic you pick. This page walks through all four. When you are ready to order, our custom enclosure page covers quantities, lead time, and price.

Start with the board, not the box

The most common enclosure mistake is drawing the box first. Then the board does not fit, and the whole thing gets redone. Start from the thing going inside it.

Measure the board outline, then add room around it. Give at least 2 mm of air on every side. Measure the tallest thing on the board too, usually a capacitor or a connector shell. That sets your inside height.

Then place the standoffs. Match the mounting holes on the board, and make the posts tall enough to keep solder joints off the floor. Draw the standoff hole for a screw or a heat-set insert, not for a printed thread.

  • Leave 2 mm of clearance around the board outline, more if the board flexes.
  • Add 3 mm above the tallest part on the board so nothing touches the lid.
  • Make standoffs at least 3 mm across, and give any heat-set insert more wall than looks necessary, because the insert expands the hole as it goes in.
  • Put a small chamfer on the top of every standoff so the board drops on easily.
  • Draw the cable path before you close the box. A cable with nowhere to bend will push the lid open.

Wall thickness for a printed enclosure

Wall thickness is the single biggest strength lever on a box. Too thin and it flexes when you pick it up. Too thick and you pay for plastic you did not need.

Size walls in whole passes of a 0.4 mm nozzle. That way the printer lays even lines with no gap hiding inside the wall. Our design for 3D printing guide has the full rule set.

Enclosure wall thickness by box size and how the box gets handled.
Under 60 mm1.6 mmSmall sensor pods and inline cases
60 to 120 mm2.0 mmThe everyday default for a desk or panel box
120 to 220 mm2.4 mmAdd ribs across any flat face wider than 100 mm
Handled or dropped2.4 to 3.2 mmRound the corners and fillet the floor joint
Wall or machine mounted3.2 mm at the mountThicken only the mounting boss, not the whole box

How the lid closes: four ways that work

The closure is where most printed boxes fail. Pick it early, because it changes the whole shape of the part.

Answer one question first. How often does this box get opened? A box opened once a year and a box opened weekly want very different lids.

Lid and closure types for a 3D printed enclosure, with what each one is good at.
Screws into heat-set insertsBrass inserts melt into the posts and take real metal threadsAnything opened more than a few timesThe post has to be thick enough not to split when the insert melts in
Snap fitA printed lip clicks over a matching ledgeCheap boxes opened now and thenSnaps fatigue, so give the arm room to bend
Slide-in lidThe lid slides down a printed grooveBoxes with a fixed baseNeeds 0.3 to 0.4 mm of clearance in the groove
Tongue and groove with a gasketA raised lip presses a soft strip against the lidDusty or damp spotsCosts a second part, and it is not a rating
  • Do not print fine threads on a lid. They strip. Coarse threads on a big round cap are the one exception.
  • Give a snap arm at least 0.4 mm of gap around it so it does not fuse to the wall.
  • Add a small pry notch. A lid you cannot get a fingernail under is a lid somebody breaks.

Cutouts for ports, buttons, and cables

Every hole in a box is a chance to be 0.5 mm off. Design the openings with room to spare and you save a reprint.

Panel connectors are the easy path. A round hole for a threaded connector is far more forgiving than a tight rectangle around a USB port. When you do need a tight rectangle, add clearance and let the connector shell hide the gap.

  • Add 0.5 mm around a port opening on every side. FDM holes come out small, and a tight port cutout is the first thing that fails to fit.
  • Put a fillet or a chamfer on the inside edge of a cutout. A sharp inside corner is where a dropped box cracks.
  • Give a button 0.4 mm of clearance in its hole so it does not bind.
  • Add a cable strain relief. A printed clamp or a zip-tie loop inside the box stops a tug from pulling a wire off the board.
  • Put vent slots on a side face, not the top. A slot on the top face is a slot that collects dust.

Heat, water, and dust: what an FDM box can and cannot do

Here is the honest answer. A printed box is not a sealed box. FDM builds in stacked lines, and those lines can leave tiny paths through a wall. We do not test or rate boxes for water or dust.

What you can do is design it closer to sealed. Use a screwed lid, add a tongue and groove lip, and press a soft TPU strip or an off-the-shelf O-ring between the halves. Point the seam down so water runs off it. That gets you a box that shrugs off splashes and shop dust. It does not get you a rating, and we will not print one on the part.

Heat is easier, because it is just a material choice. Pick from the numbers below, and give yourself margin. A box in a sunny window or next to a motor gets hotter than you think.

  • Indoor, room temperature: any of our five core materials work.
  • Near a warm motor or in a hot vehicle: PETG holds up well, and ABS takes even more heat.
  • Under a real heat load: PA-CF takes the most heat of our five core materials and stays stiff.
  • Outdoors: skip PLA. It has the lowest heat tolerance of our five core materials and gets brittle in the sun.
  • Around solvents or cleaners: PETG resists more of them than PLA or ABS.

Which FDM material fits your enclosure

PETG is our default for enclosures, and it is the right answer most of the time. It is tough, it bends before it breaks, and it handles moisture and warmth well.

Switch off PETG for a reason, not by habit. Here is what each one actually buys you.

The five FDM materials we print, compared for enclosure work.
PETGLowerDefault for indoor and outdoor boxesInstant
PLALowestIndoor demo boxes where looks matter and heat does notInstant
ABSHighHeat, impact, and boxes you plan to paintFast human quote
PA-CFHighestStiff structural housings and real heatFast human quote
TPUVaries by productThe gasket or the bumper, not the box itselfFast human quote

Print orientation for a box

A box prints best open side down. The walls rise straight up, the open mouth needs no support, and the outside faces come out clean.

That leaves the floor as the top surface, printed as a flat bridge or a sloped roof. Keep the floor simple. A floor covered in tall standoffs and pockets is the version that needs supports inside the box, and those are the hardest supports to pull out.

Print the lid flat and separate. It is faster, cleaner, and it lets you reprint just the lid when you move a port.

Layer direction changes strength. The bond between layers is usually the weaker line, so a wall pulled straight up can peel. Fillet where the wall meets the floor and that seam stops being the likely failure point.

From one prototype to a production run

This is where printed enclosures beat molded ones for small numbers. There is no tooling to pay for, so the first box costs about the same as the hundredth.

That changes how you work. Print one, put the real board in it, find the two things that are wrong, fix the file, and print it again. Do that twice and you have a box that fits. With a mold you would still be waiting on the first sample.

When the design settles, the same file runs the batch. Price is one flat number per part, and the per-part price steps down at 10, 50, 250, and 1,000 units. An instant price holds for 30 days, so a quote you got last week is still good. A reviewed quote for other materials shows its own valid-until date. The tiers are on our pricing page.

For the ordering side, quantities, and lead time, see our custom enclosure page. This page is the design guide. That one is the order desk.

How to order your enclosure

Start with your STL file. Upload it at our instant quote page. No login is needed to see a price.

PLA, PETG, PETG-CF and OPM get an instant auto price, and that price holds for 30 days. ABS, PA-CF, and TPU get a fast human quote, and the reviewed quote shows its own valid-until date. A person reviews your request and follows up by email. Either way the price is flat per part.

Order one sample or a full run. Most orders ship in 3 to 5 business days, made in the USA, so there are no customs delays. If you are not sure your design is ready, run it past our 7 design checks first.

Quick takeaways

  • Design the box around the board. Leave 2 mm of clearance on every side and 3 mm above the tallest part.
  • Use 2.0 mm walls for a normal desk box, 2.4 mm once it passes 120 mm or gets handled.
  • Pick the closure early. Heat-set inserts for a lid you open often, a snap fit for a lid you rarely open.
  • Add 0.5 mm of clearance around every port cutout, and fillet the inside corners.
  • A printed box is not a sealed box. A gasket and a screwed lid help, but we do not rate boxes for water or dust.
  • PETG is the default. Move to ABS or PA-CF for heat, and use TPU for the gasket.
  • Print the box open side down and the lid flat and separate.

Have a part to print? Get an instant price.

Instant Quote

Common questions

Are 3D printed enclosures strong enough for real products?
Yes, when the walls are sized right. A 2.0 mm PETG wall handles normal desk and panel use, and 2.4 to 3.2 mm handles a box that gets carried or mounted to a machine. Round the outside corners and fillet the joint where the wall meets the floor. Those two moves matter more than raw thickness.
Which material is best for an electronics enclosure?
PETG is the best default. It is tough, it resists moisture, and it holds its shape well. Pick ABS when the box takes hard knocks or sees more heat than PETG handles. Pick PA-CF, our reviewed option when heat resistance and demanding mechanical use matter and the one that takes the most heat, for stiff structural housings. Skip PLA outdoors, since it has the lowest heat tolerance of our five core materials.
How thick should the walls of a 3D printed enclosure be?
Use 1.6 mm for a small box under 60 mm, 2.0 mm for a normal box from 60 to 120 mm, and 2.4 mm above that. Size walls in whole passes of a 0.4 mm nozzle so the printer lays even lines. Thicken only the mounting bosses to 3.2 mm rather than the whole box.
Can a 3D printed enclosure be waterproof?
Not on its own. FDM builds in stacked lines, which can leave tiny paths through a wall, and we do not test or rate boxes for water or dust. You can get much closer with a screwed lid, a tongue and groove lip, and a soft gasket between the halves. Treat that as splash resistance, not a rating.
How do I attach the lid to a 3D printed box?
Brass heat-set inserts are the best answer for a lid you open more than a few times. They melt into the posts and give real metal threads. A snap fit works for a lid you rarely open, and a slide-in groove works when the base stays put. Do not print fine threads, because they strip.
Can I print just one enclosure?
Yes. One sample is a normal order here, and it is the smart way to start. There is no tooling cost, so the first box costs about what the hundredth does. Print one, fit your real board in it, fix what is wrong, and print it again before you commit to a run.
Do the layer lines cause problems?
Not for function. Light layer lines are normal for FDM and do not weaken a well designed box. They do matter for sealing, since the lines can leave small paths through a wall. If you want a smoother look, the part sands and paints well, and ABS takes paint best of our five core materials.