D-subminiature or D-sub is a common type of electrical connector used particularly in computers. It contains two or more parallel rows of pins or sockets usually surrounded by a D-shaped metal shield that provides screening against electromagnetic interference. The part containing pin contacts is called the male connector or plug, while that containing socket contacts is called the female connector or socket. The socket's shield fits tightly inside the plug's shield. The shields are connected to the overall screens of the cables (when screened cables are used), creating an electrically continuous screen covering the whole cable and connector system.

D-subminiature connectors were invented by Cannon, part of ITT. Cannon's part-numbering system uses a D as the prefix for the whole series, followed by a letter denoting the shell size (A=15 pin, B=25 pin, C=37 pin, D=50 pin, E=9 pin), followed by the actual number of pins, followed by the gender (M=male, F=female). For example, DB25M denotes a D-sub with a 25-pin shell size and 25 male contacts. Cannon also produce D-subs with high-current or co-axial inserts that replace several of the normal, smaller pins.

The connectors are now defined by an international standard, DIN 41652.

The widest application of D-subs is in RS-232 serial communications. RS-232 links originally used the 25-way D-sub, but for many applications the less common signals were omitted, enabling a 9-way D-sub to be used. On PCs, 9-way and 25-way plugs are used for the RS-232 (serial) ports and 25-way sockets are used for the Centronics (parallel) printer ports, though all of these are now being superseded by PS/2 connectors and USB ports. 9-way sockets were once used for the analogue video (VGA) ports, but these have been replaced by 15-way high-density sockets, which have three rows of five contacts in the same space that was previously occupied by two rows, one of five contacts and another of four.

The complete range of D-sub connectors also includes 15-way (two rows of 7 and 8), used for joysticks, 37-way (two rows of 18 and 19) and 50-way (two rows of 17 and one of 16), the last two being used in industrial products.

D-sub connectors exist in at least three types, differentiated by the method used to attach wires to the contacts. These are solder-bucket, insulation displacement and crimp. Solder-bucket contacts have a cavity into which the stripped wire is inserted and hand-soldered. Insulation displacement contacts (IDC) are designed for automated assembly, and allow a ribbon cable to be forced onto sharp tines on the back of the contacts, which pierce the insulation of all the wires simultaneously. Crimp contacts are assembled by inserting a stripped wire end into a cavity, then crushing the cavity using a crimp tool causing it to grip the wire.

A smaller type of connector derived from the D-subminiature is called the microminiature D, or micro-D, which is a trademark of ITT Cannon. This connector is used in industrial instrumentation products.