A shaft key is a small piece of metal, usually steel, that sits in a slot cut into a shaft and a mating part (like a gear or pulley) to lock them together so they rotate as one unit. Without a key, a gear mounted on a shaft could simply spin freely instead of transmitting power. Keys are one of the most common and straightforward ways to transfer torque in mechanical systems, found in everything from electric motors and pumps to agricultural equipment and automotive transmissions.
How a Shaft Key Works
The concept is simple. A rectangular or semicircular piece of metal sits partially inside a groove cut into the shaft (called a keyway) and partially inside a matching groove in the hub of whatever component is mounted on the shaft. When the shaft rotates, the key acts as a physical bridge between the two parts, preventing them from rotating independently. The torque transfers through the sides of the key rather than relying on friction alone.
Think of it like a deadbolt lock. The bolt itself is small relative to the door, but because it physically bridges the door and the frame, it prevents movement. A shaft key does the same thing between a rotating shaft and the component riding on it.
Common Types of Shaft Keys
Several key shapes exist, each suited to different situations:
- Parallel (square or rectangular) keys: The most widely used type. These have a uniform cross-section along their length and fit snugly into a milled keyway. They handle moderate to high torque loads and are easy to manufacture and replace.
- Woodruff keys: Semicircular keys that sit in a rounded pocket milled into the shaft. They self-align well on tapered shafts and are popular in automotive and smaller machinery applications, though they weaken the shaft more than parallel keys due to the deeper pocket.
- Gib-head keys: Tapered keys with a protruding head on one end, making them easier to remove with a hammer or pry tool. These are useful in applications where the key needs periodic replacement or the assembly must be disassembled for maintenance.
For standard applications involving cylindrical shafts, international standards like ISO 2491 define exact key dimensions, tolerances, and the relationship between shaft diameter and key cross-section. The sizing relationship between shaft diameter and key dimensions must be strictly followed to ensure reliable torque transfer. Key thickness tolerances are specified to the hundredths of a millimeter, with a typical tolerance range of 0 to negative 0.060 mm for smaller keys.
What Shaft Keys Are Made Of
Most shaft keys are made from low to medium carbon steel. Shafts up to 3 inches in diameter are almost always made from cold-rolled steel, and the keys that go with them are typically a similar grade. Cold-rolled steel provides a good balance of strength, machinability, and cost. For higher-stress applications, heat-treated or alloy steels can be used to increase resistance to shearing and crushing forces.
The key is intentionally designed as the weakest link in the assembly. If something jams or an unexpected overload occurs, the key shears (breaks) before the shaft or the gear does. Replacing a small steel key is far cheaper and faster than replacing an entire shaft or gearbox.
How Keyways Are Cut
The groove that the key sits in, the keyway, must be precisely machined into both the shaft and the hub. Two main methods are used.
On the shaft, keyways are typically cut using an end mill on a milling machine. The cutter moves along the length of the shaft, removing material to create a straight-sided slot of exact width and depth.
Inside the hub (the bore of a gear or pulley), the keyway is usually cut by broaching. A broach is a long tool with a series of cutting teeth, each slightly larger than the last, that is pushed or pulled through the bore in a single pass to cut the slot progressively deeper. Modern CNC mills and lathes can also perform broaching using specialized carbide inserts programmed for multiple passes. When a keyway must be cut in a blind hole (one that doesn’t go all the way through), a relief groove or cross hole is added to give the broach tool space to exit.
How Keys Fit: Clearance, Transition, and Interference
The fit between a key and its keyway matters enormously. Too loose, and the key rattles and wears. Too tight, and assembly becomes difficult or the parts can crack. ISO standards define three classes of fit for key connections.
A free (clearance) fit leaves a small intentional gap, allowing the key to slide in and out easily. This suits applications where frequent disassembly is expected. A normal (transition) fit may result in either slight clearance or slight interference depending on exact part dimensions, providing good alignment without being permanent. A close (interference) fit creates a tight, press-fit connection where the key must be driven in with force, used when the joint needs to resist heavy loads or vibration and won’t be taken apart often.
The hub side and shaft side of the keyway can have different fit classes. It’s common to have a tighter fit on the shaft side (to keep the key from falling out during assembly) and a slightly looser fit on the hub side.
Shaft Keys vs. Splines and Other Alternatives
Shaft keys aren’t the only way to lock a shaft to a hub, and they have some real limitations. A single key creates an asymmetric connection, which can cause balance problems at high rotational speeds. The keyway also removes material from the shaft, creating a stress concentration point that weakens it.
Splined shafts use a series of teeth or ridges around the entire circumference of the shaft, distributing torque evenly across the mated pair. This provides better rotating balance, higher torque capacity, and the ability to handle higher rotational speeds. Splines come in several styles, including parallel, helical, and crowned varieties. In many industries, splined shafts are increasingly preferred over keyed shafts for these reasons, without a major price increase.
That said, keyed shafts remain common in motors, gear-and-pulley systems, and applications where the connection is more permanent and doesn’t need to handle extreme speeds or frequent cycling. They’re simpler to manufacture, easier to inspect, and replacement keys are cheap and widely available. For a pump motor driving a fan at moderate speed, a keyed connection is perfectly adequate and far simpler than specifying a splined interface.
Why Keys Fail
Keys fail in two main ways: shearing and crushing. Shearing happens when the torque load exceeds the key’s ability to resist being cut in half along its length, like snapping a stick sideways. Crushing (also called compressive failure) happens when the bearing surfaces between the key and the keyway walls deform under pressure, even if the key doesn’t break cleanly.
Undersized keys, improper keyway dimensions, and poor fit are the most common causes of premature failure. A key that’s too short doesn’t have enough surface area to distribute the load. A sloppy fit allows the key to rock back and forth under load reversals, gradually wearing the keyway wider until the connection fails. Corrosion, misalignment between shaft and hub keyways, and using a softer steel grade than the application demands can all shorten key life as well.

