Print a handlebar mount for lights, phones and cameras
A clamp that fits your bar
A good handlebar clamp needs only two things: the right diameter and a way to take an accessory. This generator makes a 3D-printable handlebar mount from two halves that you screw together around the bar, with an adapter on the upper half: a flat plate with threaded holes, a phone tray, a ring for a light or a two-prong interface for action cameras. The example gallery shows fourteen clamps, for example the light holder for a 31.8 mm road bar, the phone tray for a 35 mm MTB bar and the camera interface for a kids bar.
The generator runs in your browser. Nothing is uploaded, and your design is kept in the link, which you can pass on with “Share”. The steps:
- Enter the bar diameter or tap one of the common sizes, 22.2, 25.4, 31.8 and 35 mm.
- Pick the lining thickness if you want rubber between plastic and bar.
- Choose the screws (M4 or M5) and the clamp length.
- Choose the adapter and set its sizes.
- Download STL or 3MF and print both halves in one go.
Measuring the bar
Measure with calipers at the point where the clamp will sit. Where the bar is wider because of a bend, a sleeve or sticker residue, you get a wrong reading. Typical sizes:
| Where | Diameter |
|---|---|
| Road and gravel bars, MTB bars (standard) | 31.8 mm |
| Newer MTB and e-bike bars | 35 mm |
| Older bikes, city bikes, trekking | 25.4 mm |
| Kids bikes, scooters, BMX, e-scooters | 22.2 mm |
| Seatposts | 27.2 mm, 30.9 mm, 31.6 mm |
The generator accepts any value from 18 to 50 mm, so you can clamp a seatpost, a pole or a tube as well. The clamp for a 40 mm pole is one example, the rear light holder for a seatpost another.
How the clamp works
The clamp has two halves. The upper half carries the adapter and the heads of the screws; the lower half has a hexagonal pocket for each nut on its outside. When you tighten the screws, the gap between the halves (2 mm at first) closes and the bore grips the bar. That is why the bore is cut to the bar diameter plus the lining while the halves are still apart: after tightening, the bar is held tightly, not just touched.
- Screws: M4 for lights and phone holders, M5 for cameras and for more load. Socket head screws of 25–35 mm fit. The holes are 4.5 mm for M4 and 5.5 mm for M5 and have a pointed roof, so they print without supports.
- Rows: one screw on each side of the bar is enough up to a clamp length of about 30 mm. Longer clamps can take a second pair, which grips more evenly. The generator shows a warning if the pockets do not fit.
- Length: 24 to 50 mm are common. A longer clamp spreads the grip over more of the bar and is less likely to turn.
- Wall: 6 mm around the bore is stiff enough in PETG.
The lining
Hard plastic on a painted or carbon bar slips and scratches. A strip of rubber, TPU or bicycle inner tube between the two solves both. “Lining thickness” makes the bore larger by exactly that thickness. A 1 mm strip is a good start; an old inner tube is about 1 mm, a softer rubber sheet 1.5–2 mm. Cut it to the clamp length and wrap it once around the bar so the ends meet at the split. Without a lining, set it to 0 and wrap a layer of tape around the bar.
The adapters
Plate. A flat plate on the upper half, 20 to 80 mm wide, with one, two or four holes. The hole fits a 1/4 inch screw (6.6 mm), M5 (5.5 mm) or M4 (4.5 mm). A screw can only be as long as the plate is thick, so the default is 8 mm. For a camera screw that threads into a nut, switch on the nut pocket: a hexagonal pocket on the outside of the plate takes a 1/4 inch or M-size nut. The plate for a 25.4 mm city bar and the plate with a nut pocket show both.
Phone tray. The plate gets a lip on both sides and at the bottom. A phone in a case or a small bag lies in the tray and is held by a rubber band or a strap of hook-and-loop tape; the four holes take the back of a universal phone holder if you prefer one. See the phone tray for a 35 mm bar.
Light ring. A ring with a bore for your light, which lies across the bar and points forward. You enter the diameter of the light; the ring is 0.3 mm wider. Friction and a layer of tape or a thin rubber sleeve hold it. The bore has a pointed roof, and the ring stands on 37° flanks, so it prints without supports. For a light with its own clip, use the plate instead.
Two-prong interface. Two prongs of 3.0 mm with a 3.3 mm gap and a hole for a 5 mm bolt. They are compatible with the common mounts of action cameras. The shape is described only by these sizes. Use “Fit of the prongs” to loosen or tighten the fit after a test print.
Printing
Print both halves in one go. They are laid side by side, standing on the bed with the bar axis vertical. That way the bore and all outer walls are vertical, and the layers run around the bar, which is the direction the clamping force acts in. Printed lying down, the clamp would be pulled apart between layers.
We checked all 14 examples in PrusaSlicer for the Prusa MINI with a 0.4 mm nozzle and 0.20 mm layers, with automatic supports switched on: none were generated. Some numbers (PLA, profile defaults):
| Example | Weight | Time |
|---|---|---|
| Plain clamp 31.8 mm | 20 g | 51 min |
| Camera interface 22.2 mm | 16 g | 46 min |
| Light holder 31.8 mm | 35 g | 1 h 28 min |
| Flashlight ring 35 mm | 43 g | 1 h 47 min |
| Pole clamp 40 mm | 53 g | 1 h 59 min |
| Phone tray 35 mm | 54 g | 2 h 23 min |
For the part you actually mount, use PETG or ASA with at least 4 walls and 40 % infill; that uses more filament and takes longer than the table above, so check your slicer. If a nut pocket is too snug, open it with a small file; never hammer a nut in.
Strength and safety
The clamp is a convenience part. It is not tested, and it must not hold anything whose fall could cause an accident. Some points that keep it sound:
- Orientation: print the halves standing, as exported. The ring of the clamp then lies in the layers.
- Material: PETG or ASA. PLA creeps under the permanent clamping force and softens in a hot car or in the sun.
- Screws: do not over-tighten. Tighten until the halves almost meet and the clamp no longer turns by hand. Over-tightening can crack the clamp or the nut pocket; if you need more grip, use a lining or a longer clamp instead of more force.
- Tall plates: a plate that stands far above the clamp carries a load across its layers and can break off. The generator warns if it is more than 25 mm taller than the clamp. Make the clamp longer instead.
- Check: look at the clamp before every ride. White stress marks, cracks or a bar that turns mean it is time to print a new one.
Origin and licenses
This mount is an original design. For the idea of a parametric clamp with adapters we looked at “Customizable Handlebar Mount” by samsprints (CC BY 4.0) and for the phone mount at “Customizable Bicycle Phone Mount for Stem” by jimi (CC0 1.0). No code or geometry was taken from either; all sizes are our own. The camera interface is described only by its sizes and is not tied to any brand. Sources and licenses are on the licenses page.
Open the handlebar mount generator, measure your bar and print the first test clamp. For a hook to hang the bike in the garage there is the bike hook generator.
All parameters
The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.
| Parameter | Default | Range | Meaning |
|---|---|---|---|
| Bar | |||
| Bar diameter | 31.8 mm | 18 – 50 mm | Outer diameter of the handlebar, stem or tube where it will sit. Measure with calipers: road and MTB bars are mostly 31.8 mm, older bars 25.4 mm, kids bikes and scooters 22.2 mm. |
| Lining thickness | 1 mm | 0 – 3 mm | Makes the bore larger by this much for a strip of rubber, TPU or bicycle inner tube that stops the clamp slipping and protects paint and carbon. 0 = bare plastic. |
| Gap between halves | 2 mm | 1 – 4 mm | Space between the two halves before you tighten. The screws close it, and the bore then grips the bar. 2 mm suits plastic; a thin lining needs less. |
| Clamp and screws | |||
| Clamp length | 30 mm | 16 – 80 mm | Length of the clamp along the bar. Longer clamps grip better and carry more; the screw pockets need at least 16 mm. |
| Wall around the bore | 6 mm | 4 – 12 mm | Material between the bore and the outside. 6 mm is stiff enough for PETG; thicker walls make the clamp heavier but not much stronger. |
| Screws per side | 1 | 1 – 2 | 1 or 2 screws on each side of the bar. Two screws need a clamp of about 40 mm and hold the bar more evenly. |
| Plate | |||
| Plate width | 36 mm | 20 – 80 mm | Width of the plate across the bar. If it is wider than the space between the screw heads, it gets holes for them. |
| Plate height | 30 mm | 20 – 120 mm | Length of the plate along the bar. A plate much taller than the clamp sticks out and bends more easily. |
| Plate thickness | 8 mm | 4 – 12 mm | Thickness of the plate, also the longest screw that fits into its hole. 8 mm holds a 1/4 inch screw of that length. |
| Hole spacing | 20 mm | 10 – 60 mm | Distance between the hole centers, in both directions. Holes that do not fit on the plate are left out. |
| Light ring | |||
| Light diameter | 30 mm | 15 – 50 mm | Outer diameter of the light or flashlight body. The ring is 0.3 mm wider. Measure the thickest point it sits in. |
| Ring length | 35 mm | 15 – 60 mm | Length of the ring along the light. It must stay between the clamp screws. |
| Ring wall | 3 mm | 2.4 – 6 mm | Wall thickness of the ring. 3 mm holds a light firmly; thicker is stiffer. |
| Two-prong interface | |||
| Fit of the prongs | 0 mm | -0.3 – 0.3 mm | Plus makes the gap between the prongs wider and the prongs thinner (looser fit), minus the opposite. Prongs are 3.0 mm thick with a 3.3 mm gap at 0. Print a test piece and adjust. |
Frequently asked questions
Which bar diameter do I need?
Measure the bar with calipers where the clamp will sit, not the grips or the stem. Road and mountain bike bars are almost always 31.8 mm in the middle and 35 mm on newer bikes, older and city bikes use 25.4 mm, kids bikes, scooters and some e-bikes 22.2 mm. Seatposts are mostly 27.2 mm. Type the value in directly: the bore is the bar plus the lining.
Is a printed handlebar mount safe?
It is a convenience part, not a safety part. Use it for a light, a phone or a camera that can fall without causing an accident, and never for brakes, shifters or anything you hang your weight on. Check the screws before every ride, and replace the part if you see white stress marks or cracks. We also recommend a second tether on a camera.
Which material and settings should I use?
PETG or ASA with at least 4 walls and 40 % infill. Both cope with the heat of a parking lot in summer and with vibration; PLA softens in the sun and creeps under the clamping force. Print the halves standing exactly as exported, so the layers run around the bar and not across the clamp.
Why a lining, and what do I use?
A lining of 1 mm stops the clamp slipping and protects paint and carbon from the hard plastic. Cut a strip of bicycle inner tube or thin rubber, or print a TPU sleeve. Set “Lining thickness” to its thickness and the bore grows by that amount, so the clamp still closes with the gap you chose.
Does the camera interface fit my mounts?
The two prongs follow the common interface of action cameras: 3 mm prongs, a 3.3 mm gap and a hole for a 5 mm bolt. Makers differ by a few tenths of a millimeter, so print a short test piece first and use “Fit of the prongs” to loosen or tighten it. We name no brand: the shape is only described by its sizes.
Can I print it without supports?
Yes. The halves stand on the bed with the bar axis vertical, so the bore and all outer walls are vertical. Screw holes and nut pockets have a pointed roof, and rings and prongs rest on 37° flanks. We sliced all 14 examples in PrusaSlicer with automatic supports switched on and got none. That is for 0.20 mm layers; with much thicker layers, check the preview.
Origin & license
- Customizable Handlebar Mount by samsprints · CC BY 4.0 · idea – The idea of a parametric handlebar clamp by diameter with adapters; dimensions and geometry are our own
- Customizable Bicycle Phone Mount for Stem by jimi · CC0 1.0 · idea – The idea of a phone mount on the stem; the phone tray here is our own design