---
title: "Raspberry Pi 4 and Pi 5 case, 3D printed: the 58 x 49 mm hole pattern, every port, and a prompt"
description: "Both boards are 85 x 56 mm with M2.5 holes on 58 x 49 mm, but the ports moved. Port positions for the Pi 4 and Pi 5, cooling options, and a snap-fit case prompt."
canonical: https://speakcad.com/blog/raspberry-pi-4-5-case-3d-print
published: 2026-09-08
updated: 2026-09-08
publisher: SpeakCAD
---

# Raspberry Pi 4 and Pi 5 case, 3D printed: the 58 x 49 mm hole pattern, every port, and a prompt

> Both boards are 85 x 56 mm with M2.5 holes on 58 x 49 mm, but the ports moved. Port positions for the Pi 4 and Pi 5, cooling options, and a snap-fit case prompt.

## Same footprint, different ports

| Measurement | Pi 4 Model B | Pi 5 |
|---|---|---|
| Board outline | 85 x 56 mm | 85 x 56 mm |
| Mounting holes | 4 x 2.7 mm on a 58 x 49 mm pattern, 3.5 mm from the edges | Same |
| Power | USB-C, long edge, about 11 mm from the corner | USB-C, long edge, about 11 mm from the corner |
| Video | 2 x micro HDMI, long edge, at about 26 and 39.5 mm | 2 x micro HDMI, long edge, at about 26 and 39.5 mm |
| Audio jack | 3.5 mm at about 54 mm on the long edge | None |
| USB / Ethernet | Short edge: 2 x USB 3, 2 x USB 2, Ethernet | Short edge: 2 x USB 3, 2 x USB 2, Ethernet (Ethernet moved to the other side of the USB stack) |
| microSD | Underside, short edge opposite the USB stack | Same |
| Extra | | Power button, PCIe FPC, two camera/display FPC connectors on the long edge, RTC battery header |
| Cooling | Passive OK with a heatsink; fan for sustained load | Active Cooler recommended, 60 x 40 mm footprint, 20 mm tall |

Because the Ethernet and USB stack swapped sides on the Pi 5, a Pi 4 case does not fit a Pi 5. The hole pattern and the power/HDMI edge are the same, so the base is nearly reusable and the short-edge cutouts are not.

## Cooling first

The Pi 5 throttles without cooling. If you use the official Active Cooler, the lid needs a 60 x 40 mm opening above it and about 22 mm of internal height. If you use a fan HAT or a passive heatsink, say so; the case gets a 30 or 40 mm fan grille or a hex-vent field instead. For a Pi 4, a 30 mm fan on the lid over the SoC is the usual answer.

## The prompt

> **Prompt** A two-part snap-fit case for a Raspberry Pi 5, board 85 x 56 mm, M2.5 standoffs 3 mm tall on a 58 x 49 mm pattern 3.5 mm from the edges. 2 mm walls, 0.5 mm clearance, 24 mm internal height. Lid with a 60 x 40 mm opening above the Active Cooler. Cutouts on the long edge for USB-C power, two micro HDMI and the power button; the short edge open for the USB stack and Ethernet; a microSD slot on the opposite short edge at floor level.

Change "Pi 5" to "Pi 4 Model B" and add "a 3.5 mm audio jack hole at 54 mm on the long edge and a 30 mm fan grille in the lid" for the Pi 4.

## HATs and taller stacks

A HAT on the 40-pin header sits 11 mm above the board plus its own components. A Pi with a HAT needs 30 to 35 mm of internal height and usually a slot in the lid above the HAT's connectors. Ask for "35 mm internal height and the lid open above the HAT area" and the case adapts.

## Mounting the case

- VESA 75 or 100 holes on the back to hang the Pi behind a monitor
- DIN-rail clip for a cabinet
- Two keyholes for a wall
- A slot for a 10 mm strap under a desk

Any of these is one sentence after the case exists.

## Library parts

Pre-filled prompts: [Pi 5 case with Active Cooler cutout](/library/raspberry-pi-5-case-active-cooler-cutout), [vented Pi 4 case](/library/raspberry-pi-4-case-vented), [Pi 5 case for the Hailo AI HAT](/library/raspberry-pi-5-hailo-hat-case), and a [Pi 4 wall-mount plate](/library/raspberry-pi-4-wall-mount).

## Prompts to try

- A two-part snap-fit case for a Raspberry Pi 5, board 85 x 56 mm, M2.5 standoffs 3 mm tall on a 58 x 49 mm pattern 3.5 mm from the edges. 2 mm walls, 0.5 mm clearance, 24 mm internal height. Lid with a 60 x 40 mm opening above the Active Cooler. Cutouts on the long edge for USB-C power, two micro HDMI and the power button; the short edge open for the USB stack and Ethernet; a microSD slot on the opposite short edge at floor level. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520two-part%2520snap-fit%2520case%2520for%2520a%2520Raspberry%2520Pi%25205%252C%2520board%252085%2520x%252056%2520mm%252C%2520M2.5%2520standoffs%25203%2520mm%2520tall%2520on%2520a%252058%2520x%252049%2520mm%2520pattern%25203.5%2520mm%2520from%2520the%2520edges.%25202%2520mm%2520walls%252C%25200.5%2520mm%2520clearance%252C%252024%2520mm%2520internal%2520height.%2520Lid%2520with%2520a%252060%2520x%252040%2520mm%2520opening%2520above%2520the%2520Active%2520Cooler.%2520Cutouts%2520on%2520the%2520long%2520edge%2520for%2520USB-C%2520power%252C%2520two%2520micro%2520HDMI%2520and%2520the%2520power%2520button%253B%2520the%2520short%2520edge%2520open%2520for%2520the%2520USB%2520stack%2520and%2520Ethernet%253B%2520a%2520microSD%2520slot%2520on%2520the%2520opposite%2520short%2520edge%2520at%2520floor%2520level.))
- A vented two-part case for a Raspberry Pi 4 Model B (85 x 56 mm, 58 x 49 mm hole pattern), 2 mm walls, 0.5 mm clearance, 20 mm internal height, cutouts for USB-C, two micro HDMI and the audio jack on the long edge, the short edge open for USB and Ethernet, a 30 mm fan grille in the lid over the SoC and hex vents on the sides. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520vented%2520two-part%2520case%2520for%2520a%2520Raspberry%2520Pi%25204%2520Model%2520B%2520(85%2520x%252056%2520mm%252C%252058%2520x%252049%2520mm%2520hole%2520pattern)%252C%25202%2520mm%2520walls%252C%25200.5%2520mm%2520clearance%252C%252020%2520mm%2520internal%2520height%252C%2520cutouts%2520for%2520USB-C%252C%2520two%2520micro%2520HDMI%2520and%2520the%2520audio%2520jack%2520on%2520the%2520long%2520edge%252C%2520the%2520short%2520edge%2520open%2520for%2520USB%2520and%2520Ethernet%252C%2520a%252030%2520mm%2520fan%2520grille%2520in%2520the%2520lid%2520over%2520the%2520SoC%2520and%2520hex%2520vents%2520on%2520the%2520sides.))
- A Raspberry Pi 5 case with 35 mm internal height for a HAT on the 40-pin header, M2.5 standoffs on 58 x 49 mm, the lid open above the HAT area, all Pi 5 port cutouts, and VESA 100 mounting holes on the back. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520Raspberry%2520Pi%25205%2520case%2520with%252035%2520mm%2520internal%2520height%2520for%2520a%2520HAT%2520on%2520the%252040-pin%2520header%252C%2520M2.5%2520standoffs%2520on%252058%2520x%252049%2520mm%252C%2520the%2520lid%2520open%2520above%2520the%2520HAT%2520area%252C%2520all%2520Pi%25205%2520port%2520cutouts%252C%2520and%2520VESA%2520100%2520mounting%2520holes%2520on%2520the%2520back.))

## FAQ

### Does a Pi 4 case fit a Pi 5?

No. The hole pattern and the power/HDMI edge match, but the Pi 5 swapped the Ethernet and USB positions, dropped the audio jack and added a power button. The short-edge cutouts do not line up.

### How tall does a Pi 5 case need to be with the Active Cooler?

About 24 mm inside with 3 mm standoffs. The cooler is 20 mm tall and needs the lid open above it, or 5 mm of air plus a vent grille.

### Can I add a HAT later?

Yes. Ask for more internal height and an open lid area above the HAT. Because the case is parametric, the standoffs and cutouts stay where they are and only the height changes.

## About SpeakCAD

SpeakCAD is the most intuitive CAD for 3D printing, made for people who own a 3D printer and need a part that fits something they have: tap a face and type a size to shape it with simple tools, or describe it to the AI, on your phone or computer, and download a print-ready STL, 3MF or G-code sliced for your printer.

SpeakCAD works inside ChatGPT and Claude as a plugin (an MCP server): ask the assistant for a part with its measurements and SpeakCAD's own CAD AI designs it, shows it in 3D in the chat and hands over a print-ready STL, 3MF or G-code sliced for your printer.

- Live demo, no account: https://speakcad.com/demo
- In ChatGPT, Claude and other MCP clients: https://speakcad.com/chatgpt-plugin, https://speakcad.com/claude-connector, https://speakcad.com/mcp-server
- Pricing: https://speakcad.com/pricing
- FAQ: https://speakcad.com/faq
- Site index for AI assistants: https://speakcad.com/llms.txt
