Network Cable Color Code: RJ45 T568A vs T568B Wiring

Network cable color code: RJ45 T568A and T568B pinouts, straight vs crossover.

The network cable color code is the order of the eight colored wires inside an RJ45 connector. Two schemes exist, T568A and T568B, both defined in the TIA-568 cabling standards. They differ only in swapping the orange and green pairs. Either works if both ends of a cable use the same scheme.

The color code matters every time someone terminates a cable, builds a patch cord or punches down a jack. A wrong order causes links that fail, run slowly or work only part of the time. This guide covers both pinouts, which to choose, straight-through and crossover cables, jacket colors and testing.

What is the RJ45 color code?

The RJ45 color code assigns each of the eight wires in a four-pair cable to a pin in the connector. Each pair has a solid-color wire and a matching white-striped wire: blue, orange, green and brown.

Twisted-pair cable carries signals on pairs of wires twisted together. Keeping each pair together in the right pins preserves that twist all the way to the contacts, which protects signal quality. Splitting a pair across the wrong pins can still pass a simple continuity test but cause errors under load.

Pins are numbered 1 to 8. Hold the plug with the contacts facing you and the clip facing away, and pin 1 is on the left.

The TIA-568 series is a family of cabling standards. TIA-568.1-E, published in March 2020, covers the planning and installation of structured cabling in commercial buildings. Companion documents in the series cover the balanced twisted-pair components themselves.

What is the difference between T568A and T568B?

The difference between T568A and T568B is the position of the orange and green pairs. In T568A, green occupies pins 1 and 2 and orange occupies pins 3 and 6. In T568B, those two pairs trade places. Blue and brown stay in the same pins in both.

PinT568A wire colorT568B wire color
1White/greenWhite/orange
2GreenOrange
3White/orangeWhite/green
4BlueBlue
5White/blueWhite/blue
6OrangeGreen
7White/brownWhite/brown
8BrownBrown

Notice that pins 3 and 6 are not next to each other. One pair straddles the blue pair in the middle. This split is a frequent source of termination mistakes, because installers expect each pair to sit side by side.

Electrically, the two schemes perform the same. A cable built to T568A at both ends works exactly like one built to T568B at both ends.

Should you use T568A or T568B?

You should use whichever scheme your site already uses, and use it everywhere. The TIA-568 standards present T568A as the primary pin assignment and T568B as an option, and both are found widely in practice.

Consistency matters more than the choice. Mixing schemes in one building means that a jack, a patch cord and a panel may each follow a different order. Each piece works on its own, but troubleshooting becomes slow and a reterminated end can turn a straight cable into a crossover by accident.

If you are starting fresh, check the project specification or the building's cabling standard before choosing. Write the chosen scheme into the cabling documentation, and make sure every installer and contractor follows it. The guide to cable documentation that survives the move covers what to record.

The color code is the same for Cat5e, Cat6 and Cat6a. Only the cable construction and performance differ. The Cat6a vs Cat6 guide explains those differences.

What is the difference between straight-through and crossover cables?

A straight-through cable uses the same scheme on both ends, either T568A to T568A or T568B to T568B. A crossover cable uses T568A on one end and T568B on the other, which swaps the orange and green pairs between ends.

Straight-through cables are the normal choice. They connect devices to switches, patch panels to switches, and wall jacks to computers. Almost every patch cord in a server room is straight-through.

Crossover cables were used to connect two devices of the same kind directly, such as switch to switch or computer to computer. Older Ethernet used one pair to send and another to receive, so the pairs had to cross. Gigabit and faster Ethernet over twisted pair uses all four pairs in both directions.

Many modern ports detect the wiring and adjust automatically, a feature called auto-MDIX. Where both ports support it, a straight-through cable works for any connection. Check the port specifications before assuming, and label any crossover cable clearly so it is not mistaken for a normal patch cord.

How do you terminate an RJ45 plug in the right order?

You terminate an RJ45 plug by stripping the jacket and untwisting each pair only as far as needed. Then you arrange the wires in the chosen order and crimp them into a plug rated for the cable. Check the order before crimping, not after.

Keep the untwisted length short. Untwisting more than needed weakens the protection the twists provide, especially at higher cable categories. Follow the plug or jack instructions for the maximum allowed.

Flatten the wires side by side in pin order and trim them evenly. Push them fully into the plug so each wire reaches the front. The jacket should sit inside the plug under the strain relief. Look through the clear plug from the end to confirm all eight colors are in order and seated.

For jacks and panels, follow the color labels printed on the punch-down block for the scheme you use. Many blocks show both T568A and T568B, so confirm you are reading the right row.

Is there a standard for network cable jacket colors?

There is no general standard that assigns meanings to patch cord jacket colors. Blue, yellow, red or gray jackets mean whatever your site decides they mean. The pinout color code applies only to the wires inside.

Many sites use jacket colors to separate functions, such as one color for management networks, another for storage traffic and another for uplinks. That works well if the scheme is written down and followed. It fails when someone grabs whatever color is on the shelf.

Treat jacket color as a helper, not a replacement for labels. Colors fade, look different under some lighting, and are hard for color-blind staff to tell apart. A printed label at each end is the reliable identifier.

Jacket color also has nothing to do with whether a cable is straight-through or crossover. Separate the two ideas in your documentation. The server rack cable management guide covers routing and organizing cords in the rack.

How do you test a cable after termination?

You test a cable after termination with a wiremap tester at minimum, and with a certification tester for permanent links. A wiremap test confirms that each wire lands on the correct pin and catches opens, shorts, reversed pairs and split pairs.

A basic tester has a main unit and a remote. Plug one into each end, and it reports whether each conductor connects pin to pin. It confirms the order but not the cable's performance at speed.

Certification testing measures performance against the category limits in the standards. TIA-568.0-E covers topology, distances, installation, performance and testing requirements for generic telecommunications cabling. Ask the cabling installer to certify new permanent links and hand over the results.

Patching a link and confirming that the network sees it is separate work. Your IT team checks link status and device connectivity after the cabling is in place. For new runs and terminations, see structured cabling. The patch panel vs switch guide explains how the pieces connect.

Ready to discuss your IT logistics needs?

Our team of experts is here to help with your data center relocation and infrastructure projects.