How to make a custom 3D-printed box with a lid (sized to what goes inside)

Design a box with a lid that fits what goes inside, from a gift box to a case for SD cards or bits. The lid fits on the first print, and every size is a slider. Try it free on Makerful.

By Geehwan, Founder, Makerful · December 4, 2026 · 4 min read

Yes. Give the inside size, or say what has to fit inside, and an AI CAD agent designs two matching parts: an open box and a lid that slides over it with a small gap so it fits on the first print. The inside width, depth and height, the wall, the lid's overlap and the fit gap are sliders, so you can adjust it for free, and both parts print side by side on one plate.

I run Makerful, which has a Box with lid recipe built for this, so weigh my view accordingly.

Step by step

  1. Measure what goes inside. Measure the widest, deepest and tallest point of the thing, or the stack of things, and add 1 to 2 mm each way so it drops in easily.
  2. Open the Box with lid recipe and say it in one line: "inside 60 × 40 × 25 mm, friction lid, for a ring", or "a box for 20 SD cards". If you give no size, the agent asks for it, or for what has to fit inside, before it designs.
  3. Check it and adjust it with the sliders. Inside size, wall thickness, lid overlap and the fit gap are sliders, and moving them is free.
  4. Download and print. STL or 3MF for your slicer, with the box and the lid laid out side by side so both print at once.

The first design costs 30 credits, and slider changes are free. Your first account gets 80 free credits with no card, which covers two boxes. Asking for a change that the sliders cannot make costs another 30.

Getting the lid to fit

  • Fit gap: the lid is made about 0.3 mm bigger than the box on each side. That gives a smooth press fit on most printers. If the lid is too tight, raise the gap to 0.4 mm; if it is loose, lower it to 0.2 mm.
  • Lid overlap: the lid's skirt comes 5 mm down the box by default. Shorter and the lid wobbles; much taller and it is hard to pull off.
  • Lid type: the default is a friction lid that presses on. Ask for a snap lid or a sliding lid if you want one instead.
  • Walls: a thin wall of about 1.6 to 2 mm is the default, which is strong enough for small boxes and prints fast. Raise it for a box that gets thrown in a bag.
  • Corners: the outside corners are rounded, which looks better and prints cleaner than sharp edges.

Sizes for common boxes

Box forInside size to start from
A ring or earrings (gift box)About 50 × 50 × 30 mm
A gift cardAbout 92 × 60 × 15 mm
SD and microSD cardsAbout 40 × 30 × 25 mm for a few, wider for more
Screwdriver bitsLength of a bit plus 2 mm, by the width of the row
A deck of cardsAbout 66 × 92 × 22 mm, more if the cards are sleeved

Measure your own item before you print: these are starting points, and an extra millimetre is cheaper than a reprint.

When you need something else

You needRecipe
A tray with compartments for a drawerDrawer organizer
An insert for a board game boxBoard game insert
A bottle cap or a threaded lid that screws onBottle cap

Printing it

  • Filament: PLA is fine for most boxes. PETG is tougher for a box that gets dropped or lives in a hot car.
  • Settings: 0.2 mm layers, 2 to 3 walls and 15% infill. Print the box open side up and the lid top down, as they are laid out.
  • Gift boxes: a two-colour print with the lid in a second filament looks good with no painting. Sand the lid's inside edge lightly if the first fit is stiff.

Frequently asked questions

Can I 3D print a box with a lid that fits?

Yes. Give the inside size or say what goes inside. The agent makes the box and a lid with a small gap of about 0.3 mm per side, so it presses on without sanding on most printers. The gap is a slider if your printer runs tight or loose.

How much clearance does a 3D-printed lid need?

About 0.3 mm on each side for a press fit. Use 0.2 mm for a tighter lid and 0.4 mm for a looser one or a rough printer.

Can the lid snap or slide on?

The default is a friction lid that presses on. Ask for a snap lid or a sliding lid in your message and the agent designs that instead.

Can I make a gift box?

Yes. Give the size of the gift and add a few millimetres for tissue paper. Print the lid in a different colour for a finished look.

Does it need supports?

No. The box prints open side up and the lid prints top down, so nothing overhangs.

What file do I get?

STL and 3MF for any slicer, with both parts on one plate. You can also download STEP to keep working on it in Fusion or FreeCAD.

Is it free?

Your first Makerful account gets 80 free credits with no card. A box design is 30 credits, and slider changes are free.

Made by the Makerful community

See all →

More guides