Gear Generator: Printable Spur Gears, STL and DXF

Free gear generator for involute spur gears that fit the shaft and mesh. Set the module, teeth, face width and backlash, pick a round, keyed or D-shaft bore, add a hub and a mating gear, then download each gear as STL for your slicer or a true-size DXF.

  • True involute teeth
  • Keyway, D-shaft and hub
  • STL, DXF, SVG, ZIP
  • Free, built in your browser

Spur gear

Free
mm
mm
mm
mm
mm
mm
mm

Top view

z 36 : 18 · m 1.5 · 20° · 8 mm face · backlash 0.2

a = 40.5
Tip Ø gear 157.00mm
Centre distance40.500mm
Gear 1 size57 × 16mm
Tip Ø gear 230.00mm
Ratio36 : 18 = 2 : 1
Solid PLA29.5g · 23.79 cm³

Examples

Gear generator examples: STL and DXF made here

Four gear sets built by this gear generator and shown in its own 3D preview. Download any of them and open the STL in your slicer.

  • 4 : 1 reduction pair: Module 1, 5 mm face, round 5 and 8 mm bores. Shafts 37.5 mm apart.

    m 1 · 60 : 15

    4 : 1 reduction pair

    Module 1, 5 mm face, round 5 and 8 mm bores. Shafts 37.5 mm apart.

    Made here · 2 STL + DXF · a 37.5 mm

  • Coarse pair at 25°: Module 2.5 with keyed bores. The 25° pressure angle lets the 12 tooth pinion run without undercut.

    25° · 30 : 12

    Coarse pair at 25°

    Module 2.5 with keyed bores. The 25° pressure angle lets the 12 tooth pinion run without undercut.

    Made here · 2 STL + DXF · keyed 14 and 10 mm

  • Stepper motor gear: 20 teeth with a hub and a D-flat bore for a 5 mm NEMA 17 shaft, 4.5 mm across the flat.

    m 1.5 · D-shaft

    Stepper motor gear

    20 teeth with a hub and a D-flat bore for a 5 mm NEMA 17 shaft, 4.5 mm across the flat.

    Made here · STL + DXF · D-flat Ø5, hub Ø14

  • Inch gear by diametral pitch: 24 DP equals module 1.058. Pitch diameter 2.000 in, with a keyed 10 mm bore and a hub.

    24 DP · 48 teeth

    Inch gear by diametral pitch

    24 DP equals module 1.058. Pitch diameter 2.000 in, with a keyed 10 mm bore and a hub.

    Made here · STL + DXF · 24 DP, Ø2.000 in pitch

How it works

How the spur gear generator builds a gear

The same geometry drives the 3D preview, the STL and the DXF, so what you see is what you print or cut.

  1. Top view of a 20 tooth gear with tip, pitch, base and root circles and a keyed bore
    Top view: tip, pitch, base and root circles of a 20 tooth gear

Sizing

Spur gear generator sizing: module and keyway tables

Which module prints cleanly, and the DIN 6885 keyway the gear generator cuts for each shaft size.

Which module prints well

Module≈ DPTooth heightGood for
0.550.81.13 mmClocks and models; 0.25 mm nozzle or resin
0.831.71.8 mmSmall mechanisms; resin or a fine nozzle
125.42.25 mmSmallest that prints clean with a 0.4 mm nozzle
1.516.93.38 mmHobby drives, servos and toys
212.74.5 mmRobots, winches and extruder drives
38.56.75 mmHeavier loads and large, slow gears

Keyways cut for the bore (DIN 6885)

Shaft ØKey b × hHub depth t2Shaft depth t1
over 6 to 8 mm2 × 21.0 mm1.2 mm
over 8 to 10 mm3 × 31.4 mm1.8 mm
over 10 to 12 mm4 × 41.8 mm2.5 mm
over 12 to 17 mm5 × 52.3 mm3.0 mm
over 17 to 22 mm6 × 62.8 mm3.5 mm
over 22 to 30 mm8 × 73.3 mm4.0 mm
over 30 to 38 mm10 × 83.3 mm5.0 mm
over 38 to 44 mm12 × 83.3 mm5.0 mm
  • Tooth height is 2.25 × module, so module 1 teeth are 2.25 mm tall: about the smallest a 0.4 mm nozzle prints well.
  • Keyways follow DIN 6885 (ISO R773). Under 6 mm there is no standard key: use a D-flat bore instead.
  • Printed bores come out small. Add 0.1 to 0.3 mm to the shaft size or ream the hole.

How to

How to make a gear with the gear generator

From numbers to a printable gear generator STL in about a minute.

  1. STEP 1

    Set the teeth

    Enter the module or DP, the tooth count, the pressure angle, the face width and the backlash. The top view redraws as you type.

  2. STEP 2

    Fit it to the shaft

    Choose the bore type and size, then add a hub. Turn on the mating gear and it is placed at the right centre distance.

  3. STEP 3

    Download STL or DXF

    Check the gears in 3D, then save each gear as STL, both profiles as DXF or SVG, or everything in one ZIP.

Start at 0.2 mm

That backlash suits most FDM printers; tight pairs bind.

Print flat

Hub up, as exported, so layers run across the teeth.

Binding pair?

Move the shafts 0.1 to 0.2 mm apart before you reprint.

Laser cutting

Use less backlash: the kerf already thins the teeth.

Specs

Gear generator specs and limits

What the gear generator takes, what it writes and what it leaves to you.

Teeth
6 to 200; module 0.3 to 10 mm or diametral pitch 2.5 to 85
Profile
Involute, 14.5°, 20° or 25°; 0.38 m root fillet; optional profile shift
Fit
Face width 1 to 100 mm; backlash 0 to 1 mm, half on each gear
Bore
None, round, DIN 6885 keyway (shafts over 6 to 65 mm) or D-flat
Hub
Collar on one face, diameter up to the tooth root, any height
Mating gear
Same module and pressure angle, own teeth and bore, placed in mesh
Output
Binary STL per gear (mm), DXF R12 and SVG at 1:1, ZIP of all files
Where it runs
Built in your browser tab; nothing is uploaded

It does

  • Build closed, watertight STL solids at true size
  • Cut keyways, D-flats and round bores through gear and hub
  • Place the mating gear at the working centre distance
  • Warn about undercut and low contact ratio
  • Report volume and an estimated PLA weight

It does not

  • Make helical, herringbone, bevel, worm or internal gears
  • Drill a set-screw hole; drill and tap the hub after printing
  • Add spokes, lightening holes or chamfers
  • Rate strength; printed gears suit light loads
  • Model undercut or the hobbed trochoid root

Uses

Where a gear generator STL or DXF goes

Print it, cut it or build on it in CAD. For every diameter and the gear ratio, speed and torque, use the gear calculator.

  • Desktop 3D printer with printed parts

    3D printed drives

    Robots, winches, clocks and toys: print the STL in PETG or nylon for wear.

  • Desktop laser engraver marking plywood

    Laser cut gears

    Cut the DXF from plywood or acrylic and stack layers for a thicker gear.

  • CNC plasma table cutting steel

    CNC and waterjet

    Send the true-size outline to CAM and cut metal gears for slow drives.

  • Pencil and scale ruler on a drawing

    CAD starting point

    Import the DXF profile and add spokes, set screws or a pulley in your CAD program.

Gear generator FAQ

Module, backlash, bores, files and limits.

Is this gear generator free, and is my design uploaded?

Free with no sign up. The gear generator builds the solid and writes the STL and DXF in your browser, so nothing is sent to a server.

What module should I use for a 3D printed gear?

With a 0.4 mm nozzle, module 1 is about the smallest that prints clean teeth and 1.5 to 2 suits most hobby drives. Smaller modules need a 0.25 mm nozzle or a resin printer.

How much backlash do printed gears need?

Start with 0.2 mm for the pair: 0.15 mm on a well tuned printer, 0.3 mm if teeth come out fat. Each gear is thinned by half of it at the pitch circle.

How far apart should the shafts be?

At the centre distance shown under the preview: a = m(z₁ + z₂)/2 without profile shift, so module 1.5 with 36 and 18 teeth gives 40.5 mm. Backlash is built into the teeth, so do not add extra.

Which keyway size does the gear generator cut?

DIN 6885, picked from the bore: 2 × 1.0 mm for shafts over 6 to 8 mm, 3 × 1.4 mm over 8 to 10 mm, 4 × 1.8 mm over 10 to 12 mm (key width × hub depth). Under 6 mm, choose a D-flat.

What is the D-shaft option for?

Motor shafts with a flat, such as 5 mm NEMA 17 steppers. The bore is cut 0.9 × the diameter across the flat, 4.5 mm for a 5 mm shaft.

Can I get a gear generator DXF for laser cutting?

Yes. The DXF holds both outlines and bores at true size in millimetres, with pitch circles and centre lines on their own layers. Cut only GEAR and BORE, and use less backlash than for printing.

Is the gear generator STL watertight?

Yes. Each STL is built as one closed solid with shared vertices. Our tests check that every edge joins exactly two triangles, that the volume matches the profile and that the manifold-3d geometry kernel accepts it as a closed solid.

Why does it warn about undercut?

Below about 17 teeth at 20° a cutter would undercut the root, and a big mating gear can jam against the full flank drawn here. Add teeth, switch to 25° or add a positive profile shift.

Can I make helical, internal or bevel gears?

Not yet. This spur gear generator makes straight cut external gears only.

Can I add a set screw?

Not in the model. Add a hub, print, then drill and tap the hub over the keyway or flat, or melt in a threaded insert.

Which material should I print gears in?

PLA for light, slow mechanisms; PETG is tougher; nylon wears best and runs quietly. Use 3 to 4 walls and 40 % infill or more.

Make your gear with the gear generator

Set the teeth, fit the bore, check it in 3D and download the STL. Nothing leaves this tab.

Open the gear generator