How to 3D Print a Switch: Keyboard, Electrical & More

3D printing a switch is absolutely doable, whether you’re building a custom mechanical keyboard switch, a replacement toggle for a project enclosure, or a shell for a Nintendo Switch Joy-Con. The process depends heavily on which type of switch you’re making, but the core challenges are the same: tight tolerances, smooth-moving parts, and choosing the right material. Here’s how to approach each type.

Mechanical Keyboard Switches

This is the most common “3D printed switch” project in the hobbyist community, and also the most demanding. A Cherry MX-style switch has a housing, a stem that slides inside it, a spring, and metal contact leaves. The housing dimensions on a standard MX switch sit around 15.6mm tall and 11.6mm wide, with internal tolerances as tight as ±0.05mm on critical sliding surfaces. That’s well within reach of a tuned printer, but it leaves almost no room for error.

You can find open-source switch designs on sites like Printables, Thingiverse, and GitHub. Some popular ones include the “Void Switch” and various MX-compatible designs that let you reuse off-the-shelf springs and contact leaves from cheap switches you disassemble. Starting with one of these proven designs is far easier than modeling from scratch, since the internal geometry has already been dialed in.

Printing the Housing and Stem

For keyboard switches, you have two main printing approaches: FDM (filament) and SLA (resin). Resin printers produce significantly smoother surfaces, which matters because the stem slides up and down inside the housing thousands of times. Smoother surfaces mean less friction and a better feel out of the box. However, resin prints are generally weaker and more brittle, so housings can crack if you press-fit them into a plate too aggressively.

FDM prints with PLA or PETG work well for housings, which mostly just need to hold their shape. For stems, FDM layer lines create noticeable scratchiness during the keystroke. You can reduce this by printing stems vertically (so layers run parallel to the sliding direction), using a 0.1mm or smaller layer height, and sanding lightly with fine-grit sandpaper afterward. If you have access to both printer types, printing housings on FDM and stems on resin gives you the best of both worlds.

Regardless of printer type, print a few test pieces first and check fitment before committing to a full set. Even 0.1mm of dimensional drift can make a stem bind or wobble.

Springs, Contacts, and Assembly

You won’t 3D print the spring or the electrical contacts. Springs are cheap and widely available from keyboard parts vendors. Most switches use springs in the 50g to 70g bottom-out range. A 50-55g spring feels light (similar to a Gateron Yellow), while 60-70g feels medium-firm (like a Gateron Black). Springs as light as 35g and as heavy as 85g exist for people who want extremes. Buy a spring sample pack to find your preference before ordering in bulk.

For contacts, the easiest approach is to harvest metal leaf springs from inexpensive switches. Budget switches from Gateron or Outemu cost under $0.20 each, and their contact leaves pop right out of the housing. Design your printed housing to accept these standard contact leaves, and you get reliable electrical performance without trying to fabricate tiny metal parts.

Lubing for Smooth Feel

3D printed switches almost always feel rougher than injection-molded ones, so lubrication isn’t optional. Apply a thin coat of lubricant to all four sides of the stem and to the inside of the housing where the stem makes contact. A small brush works best for even coverage.

The lubricant you choose depends on the switch type you’re building. For linear switches (no bump, no click), Krytox 205g0 is the community standard because of its thicker consistency. For tactile switches, use something thinner like Tribosys 3203 or Carbon GS1, since a heavy lube will dampen the tactile bump you’re trying to preserve. If you’re making a clicky switch, use very little lube or none at all, as it will muffle the click.

For springs specifically, you can save time by batch-lubing: drop all your springs into a small plastic bag, add 20-30 drops of oil, seal the bag with some air inside, and shake. This coats every coil evenly without the tedium of doing them one at a time.

Electrical Toggle and Rocker Switches

If you’re printing a physical toggle switch for a project enclosure, the design is simpler: a lever or rocker that actuates a small microswitch or pushes two conductive contacts together. The 3D printed part is just the mechanical body. The actual electrical switching happens through a purchased microswitch or metal contacts you embed in the design.

For low-voltage applications (5V Arduino projects, LED circuits, battery-powered devices), standard PLA is fine. It’s non-conductive and more than adequate for anything under 50V with minimal current.

Material Safety for Higher Voltages

If your switch will be anywhere near mains voltage (120V or 240V), material choice becomes a safety issue. Standard PLA and PETG can deform or ignite under sustained heat from a poor connection or arc. Fire-retardant filaments exist for this purpose. PETG with fire-retardant additives (rated V0 on the UL flammability scale) is one of the more printable options. Fire-retardant ABS is another solid choice that prints well on enclosed printers.

A practical test: take a lighter or small torch to a sample of your filament. If it catches fire and stays lit after you remove the flame, don’t use it near mains electricity. The original housings on commercial switches are typically polycarbonate, which has excellent heat resistance and self-extinguishing properties.

One important caveat: anything you print yourself won’t carry a UL safety rating. For personal projects in a workshop, that’s your call. But in a home’s permanent wiring, an unrated switch could create insurance complications if something goes wrong. For mains-voltage applications, it’s generally smarter to print a custom faceplate or enclosure that houses a commercially rated switch mechanism inside.

Nintendo Switch Joy-Con Shells

Replacement Joy-Con shells are a popular print for anyone who’s stripped one of those tiny Y-screws during a repair. Modified shell files designed for FDM printing are available on Printables, with the full left and right shells included in a single file that you split in your slicer.

These prints demand fine detail. Use a 0.1mm layer height with a 0.4mm nozzle. PLA is the recommended material here. PETG technically works but makes support removal much harder on the thin internal features. Enable support generation with an overhang threshold of 25 degrees and set supports to build plate only. For the front shell piece, skip the raft. For the middle section, increase the XY separation between the object and its supports to 60% so the supports break away cleanly from delicate geometry.

Expect roughly 8.5 hours of print time and about 45g of filament per set. After printing, carefully remove supports from four of the six parts. You may see visible seam lines depending on your slicer settings. Setting the seam position to “random” distributes them so no single line stands out, though light sanding or a coat of filler primer can clean things up further. Use the original screws and internal hardware from your damaged Joy-Con to assemble the new shell.

General Tips for Printing Moving Parts

Any switch with parts that slide or pivot against each other benefits from the same set of practices. Print at the finest layer height your patience allows, since layer lines are the primary source of friction on printed surfaces. Orient parts so that the sliding direction runs parallel to the layer lines rather than across them. Leave 0.2mm to 0.3mm of clearance between mating surfaces in your CAD model, then adjust based on test prints. Every printer has slightly different dimensional accuracy, so what works on someone else’s machine may need tweaking on yours.

Post-processing makes a bigger difference on switches than on most prints. Light sanding with 400-grit or finer paper on sliding surfaces, followed by a thin coat of lubricant, can turn a scratchy prototype into something that feels genuinely good to use. For resin prints, make sure parts are fully cured before assembly, as undercured resin stays slightly tacky and creates drag.