A rack and pinion is a type of linear actuator that comprises a circular gear (the pinion) engaging a linear gear (the rack). Together, they convert rotational motion into linear motion. Rotating the pinion causes the rack to be driven in a line. Conversely, moving the rack linearly will cause the pinion to rotate. A rack and pinion drive can use both straight and helical gears. Though some suggest helical gears are quieter in operation, no hard evidence supports this theory. Helical racks, while being more affordable, have proven to increase side torque on the datums, increasing operating temperature leading to premature wear. Straight racks require a lower driving force and offer increased torque and speed per percentage of gear ratio which allows lower operating temperature and lessens viscal friction and energy use. The maximum force that can be transmitted in a rack and pinion mechanism is determined by the tooth pitch and the size of the pinion as well as the gear ratio.
For every pair of conjugate involute profile, there is a basic rack. This basic rack is the profile of the conjugate gear of infinite pitch radius (i.e. a toothed straight edge).
Rack and pinion combinations are often used as part of a simple linear actuator, where the rotation of a shaft powered by hand or by a motor is converted to linear motion.
The rack carries the full load of the actuator directly and so the driving pinion is usually small, so that the gear ratio reduces the torque required. This force, thus torque, may still be substantial and so it is common for there to be a reduction gear immediately before this by either a gear or worm gear reduction. Rack gears have a higher ratio, thus require a greater driving torque, than screw actuators.
Most stairlifts today operate using the rack and pinion system.
A rack and pinion is commonly found in the steering mechanism of cars or other wheeled, steered vehicles. Rack and pinion provides less mechanical advantage than other mechanisms such as recirculating ball, but less backlash and greater feedback, or steering "feel". The mechanism may be power-assisted, usually by hydraulic or electrical means.
The use of a variable rack (still using a normal pinion) was invented by Arthur Ernest Bishop in the 1970s, so as to improve vehicle response and steering "feel", especially at high speeds. He also created a low cost press forging process to manufacture the racks, eliminating the need to machine the gear teeth.
Rack railways are mountain railways that use a rack built into the center of the track and a pinion on their locomotives. This allows them to work on steep gradients, up to 45 degrees, as opposed to conventional railways which rely on friction alone for locomotion. Additionally, the rack and pinion addition provides these trains with controlled brakes, and reduces the effects of snow or ice on the rails.
A rack and pinion with two racks and one pinion is used in actuators. An example is pneumatic rack and pinion actuators that can be used to control valves in pipeline transport. The actuators in the picture on the right are used to control the valves of large water pipeline. In the top actuator, a gray control signal line can be seen connecting to a solenoid valve (the small black box attached to the back of the top actuator), which is used as the pilot for the actuator. The solenoid valve controls the air pressure coming from the input air line (the small green tube). The output air from the solenoid valve is fed to the chamber in the middle of the actuator, increasing the pressure. The pressure in the actuator's chamber pushes the pistons away. While the pistons are moving apart from each other, the attached racks are also moved along the pistons in the opposite directions of the two racks. The two racks are meshed to a pinion at the direct opposite teeth of the pinion. When the two racks move, the pinion is turned, causing the attached main valve of the water pipe to turn.
A rack gear that is curved is called an arcuate rack.
The rack and pinion mechanism was first developed in China by firearms designer Zhao Shizhen. In his book of 1598 AD, the Shen Qi Pu (神器譜), the Xuanyuan arquebus (軒轅銃) featured a firing mechanism using a rack and pinion system that was inspired by Turkish matchlock designs that featured a novel pivoting firing mechanism. The Xuanyuan arquebus was designed in response to contemporary firearm unreliability problems arising from rainy and windy conditions, and offered a trigger that simultaneously operated both the flash pan and serpentine. The Wu Pei Chih (1621) later described Ottoman Turkish muskets that used a rack-and-pinion mechanism. 
- Gear Nomenclature, Definition of Terms with Symbols. American Gear Manufacturers Association. 2005. p. 72. ISBN 1-55589-846-7. OCLC 65562739. ANSI/AGMA 1012-G05.
- "Rack and pinion variable ratio steering gear". Google Patent Search. Retrieved 2007-03-22.
- "The Role of Rack and Pinion Actuators in On-Off & Modulating Controls". Valve Magazine. Valve Manufacturers Association (Spring 2010).
- "Automax SuperNova Series Pneumatic Rack & Pinion Actuators" (PDF). Flowserve Corporation. Retrieved 7 July 2014.
- Phillips, Jack (2003). General Spatial Involute Gearing. Berlin, Heidelberg: Springer Berlin Heidelberg. ISBN 3662053020.
- Needham, Joseph (1986), Science & Civilisation in China, vol. V:7: The Gunpowder Epic, Cambridge University Press, p. 446, ISBN 0-521-30358-3
- 和田, 博徳 (October 1958). 明代の鐡砲傳來とオスマン帝國 : 神器譜と西域土地人物略」『史學』第31巻1-4. Tokyo: 三田史学会、東京. pp. 692–719.