The original serial connectors were 25 pins, with some/many/most of the pins used. The DB-9 RS-232 connector just takes the nine most popular pins from the DB-25 connector. In either DB-25 or DB-9 connector, which pins are actually used depends on the hardware/software implementation of the serial protocol. At minimum, for two-way serial communication you need just three pins:

  • RX (Receive) - connected to TX on the other end. Pin 2 on standard DB-9 and DB-25
  • TX (Transmit) - connected to RX on the other end . Pin 3 on standard DB-9 and DB-25
  • GND (Signal ground) - Pin 5 on standard DB-9 and pin 7 on standard DB-25

(Note that sometimes particular serial cables are wired in non-standard way, but this is very rare. Indeed, there is a number of possible serial connectors). If your serial communication is one-way then you might only use two pins: TX/RX and GND.


The particular cable you have connects the six most popular lines. Cables that connect only some of the DB-9 serial lines are widely available, though do not assume that the same six pins are connected on all DB-9 cables. Depending on your needs, the six connected pins may or may not be sufficient. If you know which pins your hardware/software needs, then you would look for a cable that has those pins actually wired. For most modern needs (if "modern" can be used to apply to serial port in 2013) six wires is sufficient.


Unfortunately, there is no standard for color coding serial lines. You might hope that signal ground is black/brown, though often it is green, or some other random color. TX/RX are often yellow and green, but again you cannot count on this. The only way to know which color is connect to what pin is to test with a multimeter.

Answer from angelatlarge on Stack Exchange
Top answer
1 of 2
3

The original serial connectors were 25 pins, with some/many/most of the pins used. The DB-9 RS-232 connector just takes the nine most popular pins from the DB-25 connector. In either DB-25 or DB-9 connector, which pins are actually used depends on the hardware/software implementation of the serial protocol. At minimum, for two-way serial communication you need just three pins:

  • RX (Receive) - connected to TX on the other end. Pin 2 on standard DB-9 and DB-25
  • TX (Transmit) - connected to RX on the other end . Pin 3 on standard DB-9 and DB-25
  • GND (Signal ground) - Pin 5 on standard DB-9 and pin 7 on standard DB-25

(Note that sometimes particular serial cables are wired in non-standard way, but this is very rare. Indeed, there is a number of possible serial connectors). If your serial communication is one-way then you might only use two pins: TX/RX and GND.


The particular cable you have connects the six most popular lines. Cables that connect only some of the DB-9 serial lines are widely available, though do not assume that the same six pins are connected on all DB-9 cables. Depending on your needs, the six connected pins may or may not be sufficient. If you know which pins your hardware/software needs, then you would look for a cable that has those pins actually wired. For most modern needs (if "modern" can be used to apply to serial port in 2013) six wires is sufficient.


Unfortunately, there is no standard for color coding serial lines. You might hope that signal ground is black/brown, though often it is green, or some other random color. TX/RX are often yellow and green, but again you cannot count on this. The only way to know which color is connect to what pin is to test with a multimeter.

2 of 2
1

Assuming your connector is for RS-232 (notice that a DB9 may be used for other interfaces too) there are pins that aren't used in some cases. For instance, a cable to connect two computers doesn't need the RI (ring indicator) pin; also one of the pairs RTS/CTS or DSR/DTR may not be connected, since either one or the other is used in most transmission modes. Take a look at http://pinouts.ru/SerialPorts/Serial9_pinout.shtml

🌐
Custom Cable Connection
customcableconnection.com › products › serial-cable-db9-female-blunt
DB9 RS-232 Female to Blunt - All 9 Pins - 24 AWG - Serial Breakout Cab – Custom Cable Connection
DB9 Serial Breakout CableDB9 FemaleMetal HoodFully Wired all 9 Pins Stripped and Tinned24 AWG WirePVC Jacket Color Code:1 Black2 White3 Red4 Green5 Blue6 Yellow7 Orange8 Purple9 GreyShield to Shield
🌐
Pinout Diagrams
pinoutdiagrams.com › home › db9 pinout and color code
Db9 Pinout and Color Code Guide: Everything You Need to Know
June 30, 2024 - This simplified guide aims to shed light on the decoding of the DB9 color code, providing a comprehensive understanding of its significance and usage. Color coding plays a critical role in simplifying the identification and connection process of various components within the DB9 connector. It eliminates the need for tedious trial and error, ensuring a reliable and efficient communication setup. By assigning specific colors to different pins, the DB9 color code imparts clarity and consistency to the complex web of connectivity.
🌐
Pinout Diagrams
pinoutdiagrams.com › home › db9 pinout colour code
Db9 Pinout Colour Code: A Complete Guide
June 30, 2024 - When working with the DB9 connector, it is important to consider the different wiring options available. The pinout diagram not only provides information about the pin functions but also indicates the color code associated with each wire. The color code helps users identify specific wires quickly, ...
🌐
AliExpress
aliexpress.com › s › wiki-ssr › article › db9-cable-color-code
DB9 Cable Color Code: A Comprehensive Guide to Choosing the Right Connector for Your Project
Here’s a simple way to identify the color code: <ol> <li> Locate the DB9 connector on your device or cable. </li> <li> Check the color of each pin. The colors typically follow a standard pattern. </li> <li> Refer to a color code chart to match each color to its function.
🌐
Scribd
scribd.com › document › 917536794 › Configuracion-Acr
DB9 and DB25 Pin Color Codes | PDF
The document provides a pinout chart for DB9 and DB25 connectors, listing the pins and their corresponding colors. Most pins are marked as N/A, indicating no specific color is assigned. Only a few pins in the DB25 connector have additional ...
🌐
Pinout Diagrams
pinoutdiagrams.com › home › db9 rs232 pinout color code
Db9 Rs232 Pinout Color Code: A Complete Guide
June 30, 2024 - This comprehensive guide will delve into the intricate details of the DB9 RS232 pinout, focusing specifically on the color codes associated with each pin.
Find elsewhere
🌐
Details Pin
detailspin.com › home › rs232 db9 color code pinout
RS232 DB9 Color Code Pinout: Complete Guide and Wiring Diagram
November 22, 2025 - Pin 9 (RI): Ring Indicator, often in black, alerts the receiving device about the incoming telephone ring signal. This standardized color code for the DB9 connector allows for ease of identification, making it simpler to establish reliable connections for RS232 communication.
🌐
Details Pin
detailspin.com › home › rs232 pinout db9 color code
RS232 Pinout DB9 Color Code: A Complete Guide
June 16, 2024 - The RS232 pinout refers to the arrangement of pins in a DB9 connector, which is commonly used for serial communication. Each pin serves a specific purpose and understanding their functions is crucial in establishing successful communication between devices. This guide will break down the various pins and their corresponding colors, enabling you to easily identify and connect the appropriate pins for your desired application.
🌐
Pinout Diagrams
pinoutdiagrams.com › home › rs232 db9 cable pinout color code
RS232 DB9 Cable Pinout Color Code Guide
June 30, 2024 - With a solid understanding of the connection standards, pinout configuration, color coding conventions, and device interfacing, you’ll be well-equipped to tackle any RS232 DB9 cable-related challenges that may arise. Understanding the Pinout Diagram and decoding the Color Code is essential for working with RS232 DB9 cables.
🌐
Alicat
documents.alicat.com › pinouts › DOC-PINOUT-DB9.pdf pdf
DOC-PINOUT-DB9 - REV 12, November 2023 3 ⁄ 40 TM +1 (888) 290-6060
DB9 (Male and Female) Standard Pinout · Always identify proper wiring via continuity check & color when using multi-strand cables. The calibration certificate for the device should be used as the definitive reference for custom wiring options. Note: Do not connect RS-485 to RS-232 units or cables.
🌐
Details Pin
detailspin.com › home › rs232 db9 pinout color code
Complete Guide to RS232 DB9 Pinout Color Code
June 16, 2024 - By understanding the role of each wire color and its corresponding pin, we gain the ability to troubleshoot issues, optimize performance, and even design custom connections tailored to specific needs. The RS232 DB9 pinout color code truly forms the backbone of reliable and efficient data transmission in the realm of electronic communication.
🌐
Scribd
scribd.com › document › 954066 › Communication-Wiring-Color-Codes
Communication Wiring Color Codes | PDF | Optical Fiber | Decibel
(This color code is remembered by BLOG - BLueOrangeGreen and brown) 25 9 9 25 Pin Pin Pin Pin FG (Frame Ground) 1 - X - 1 FG TD (Transmit Data) 2 3 - 2 3 RD RD (Receive Data) 3 2 - 3 2 TD RTS (Request To Send) 4 7 - 8 5 CTS CTS (Clear To Send) ...
Rating: 4.6 ​ - ​ 5 votes
🌐
Details Pin
detailspin.com › home › db9 cable wiring color code to pinout
Db9 Cable Wiring Color Code to Pinout: A Comprehensive Guide
June 16, 2024 - As you delve into the world of Db9 connectors and their wiring color code, be prepared to navigate a rich tapestry of technical details and terminologies. From the vibrant greens to the fiery reds, each color represents a unique function. The pinout arrangement, another piece of the puzzle, determines the positioning of these wires within the connector.
🌐
Metabee
metabee.com › home › blog › d-sub
DB9 Pinout: The Secret Language of Serial Ports Decoded
September 16, 2025 - Straight-through DB9 serial cables are used to connect a DTE device to a DCE device. It links each pin directly to its corresponding pin on the other end, allowing the naturally aligned transmit and receive signals to pass through. Here is a typical wiring diagram and corresponding color code for ...
🌐
Graftek
cdn.graftek.com › system › files › 14147 › original › 785605-01.pdf pdf
DB9M/DB15M/DB25M Pigtail Cable Pinout Guide
The National Instruments DB9M, DB15M, and DB25M Pigtail cables are 9-, 15-, and 25-pin male DSUB cables for connecting a variety of devices to your National · Instruments product. The following table lists the color-coded pin assignments for · these cables, according to the number of pins and part number.
🌐
Metabee
metabeeai.com › home › blog › rectangular connectors › db9 vs rs232: understanding the key difference
DB9 vs RS232: Understanding the Key Difference - MetabeeAI
October 17, 2025 - In such cases, only Pin 2 (TXD), Pin 3 (RXD), and Pin 5 (GND) are essential, while the remaining pins are less significant. There’s no official color code for RS232 wiring, but most pre-made cables use a common standard.
🌐
Pinout Diagrams
pinoutdiagrams.com › home › db9 connector pinout color
Db9 Connector Pinout Color - Complete Guide and Reference
June 30, 2024 - The pin configuration of the Db9 ... This pin is responsible for transmitting data from one device to another. It is often color-coded as orange or labeled as “TxD”....
🌐
Thecommsguy
thecommsguy.com › wiring
Wiring – The Comms Guy
There's no Spec'd color code from RTS, because it depends on the type of wire being used.