What Each Colored Wire Inside a USB Cord Means

Updated on January 5, 2016
USB Color coded wire
USB Color coded wire | Source

USB Color Coded Wires

Most hardware pieces today connected to our CPUs are USB-driven, meaning that they require use of a USB cord or wire. This includes your keyboard, mouse, webcam, memory flash drive, some speakers, the external hard drive, camera or digicam, video cam, and more.

So what is inside it, exactly? USB stands for Universal Serial Bus, and there are four wires inside of it — usually, it's a red, green, white, and black cord. Each of these wires has a corresponding code:

  • Red color indicates the positive wire with 5 volts of DC power.
  • Black has always been the ground wire in almost all electronic devices.
  • White is the data as a "positive" wire, while
  • Green is also for the data , but as the negative wire.

Common USB wires inside
Common USB wires inside | Source

Other Colors

Some USB cords have different wire color combinations, like orange, blue, white, and green. In this case:

  • Orange is the positive, with 5 volts of power in the DC (direct current).
  • White indicates a ground wire, meaning the negative wire.
  • Blue corresponds to the negative data
  • Green as the positive data.

USB color wires with corresponding codes
USB color wires with corresponding codes | Source

Important Things to Note about USB Cords

These are generally the types of different USB color coded wires out there. So, if you are asked or asked about the color codes in the wiring of a hardware device, you can reference this article.

  • Note that the wiring inside a webcam has four wires, but check if your webcam has microphone built in inside. You can trace the wire if so.The Nokia USB pinout has the same code if we skin the wires.
  • Now that you know about the inside of a wire, the next question is: should you use a shield on your USB pin out? Yes, you should. Shielding is very important for protection.
  • You also cannot have a USB cable without the positive and negative, or the ground. The most important wires inside are the positive and negative wires. These are the paths of electric power needed to run your device. Also, you now know what color they are!

Feel free to leave a comment below if you have questions or suggestions. I hope you learned something today. Thank you!

Poll on USB cable defects:

What is your common USB problem?

See results

© 2012 Mark Johann

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      ruwan alahakoon 11 days ago

      your post is great bro.tnx for support:)

    • profile image

      Tre 3 weeks ago

      Have USB cable charger with white green and red wire no black which is power an ground

    • profile image

      Naseeb Zada 4 weeks ago

      Thank You so much.

      I had to join two USB cables, the one was of the common color coded but, the second was Orange, White, black and blue.

      So, thanks again.

    • profile image

      Gage 4 weeks ago

      So could it be possible to double up each wire where they originally connect to get "double", or faster charge ?

    • profile image

      Eashan 7 weeks ago

      I have a gamepad with red white green and orange wire what to do then

    • profile image

      Ankit4252 2 months ago

      Hi Mark

      1.I have a USB cable (I-phone 6) which has three wires light Red,White & Green, other than this it also has a Non- insulated wire wrapped around these three wires. Could you please let me know the order in which i need to join it with USB connector.

      2.I have another USB cable (I-phone 6) which has three wires i.e. Two white (One is bit thicker than other) & one Gray wire other than this it also has a Non- insulated wire wrapped around these three wires. Could you please let me know the order in which i need to join it with USB connector. Many Thanks !!

    • profile image

      Kyle 2 months ago

      I have a USB with the wire colours of,

      White

      Green

      Blue

      Black

      Where can I get the USB end to fit this?

      Thanks

    • profile image

      eloxim300.000.000€ miria_gia_ti_xwra 2 months ago

      Hi there!

      I have RED 5+ wire BLACK is ground WHITE is data + and GREEN.

      Here I have another one naked wire I suppose is Ground as BLACK wire. Am I correct ?

    • profile image

      Samuel 3 months ago

      My charger has four wires, red, green, white, black. There is also a bare wire leading from the front of the plug itself. What is that for?

    • profile image

      Matthew 3 months ago

      USB doesnt connect to aux, without an active adaptor, at least not in the sense of transmitting audio directly, as AUX carries an analogue signal encoded completely different from USB's UART digital encoding.

    • profile image

      Kyle m 3 months ago

      So how do u make a USB to aux where does the green wire hook up to

    • profile image

      greg 4 months ago

      how do you wire up the battery in your phone useing the wires and usb on t5he other end

    • profile image

      Luke 4 months ago

      Me too Luca! Gotta jumpstart these devices!

    • profile image

      Aravindhari 4 months ago

      my keyboard is having in orange,white,green,blue and board is having clock,date,gnd,vcc. so which wire is connet to which place, what i do

    • profile image

      moht 4 months ago

      why we use red(5v) wire here?

    • profile image

      Luca 4 months ago

      Wiring up a snapped USB cord to the battery of a mobile phone that has the USB port dissoldered, so can’t charge itself up.

      Thanks

    • profile image

      Simon 4 months ago

      Color are different

    • profile image

      Jessica 5 months ago

      My wires are bkack white. Second charger i spliced there was 2 white and 2 blue wires. One blue wire has silver wire and the other 3 wires are copper. What wires do i use to charge my s5 as the charging port is broken.

    • profile image

      5 months ago

      Need small cell phone u.s.b color code and tv audio and video color code

    • profile image

      Phil 5 months ago

      I was "fixing" my phone charger and it has 2 red wires? Lg 5

    • profile image

      Vijay 5 months ago

      What if data cable has only 2 wires red and black. My charger Cable has 2 wires only

    • profile image

      abhi 5 months ago

      amazing its very usefull for me thanqq

    • profile image

      Krishnakumar 6 months ago

      My wire has only two wires : Black and Red

      I want to use it for some other purpose

      What is the circuit???

    • profile image

      kagula 6 months ago

      i gt keyboard usb icant match the color and symbol, my usb wire color are blue,green,white and orange. symbols are D,C,G and V help me which color to which symbol

    • profile image

      Yvonne Davis 6 months ago

      Need to splice 3color coded wires to 2wires not color coded, both refriderators. I can't get it right keep blowing my circuit.

    • profile image

      Meran 6 months ago

      The USB plug on my Mp3 Player charging cord broke off! I cannot tell which side of the plug is meant for the positive or negative

    • profile image

      Ted Askin 6 months ago

      Which wire is the charging line. Red probably eh?

    • profile image

      Nita 6 months ago

      What wires do i connect if one USB cord has red n orange & light green n white wires and the other USB cord has red n white & green n black wires

    • profile image

      Leo Esch 7 months ago

      I would like to connect an External WIFI antenna directly to my tablet. Does anyone know which two USB wires must go from the antenna to the USB plug so it will function.

    • profile image

      Jennifer 7 months ago

      Can a USB white no green and white wire still be used?

    • profile image

      Shivam Thakur 7 months ago

      Thank you so much for your help

    • profile image

      Aphixsos 7 months ago

      Pls hw will i connect game pad with 5 wires red white green yellow black

    • profile image

      Emeterio Jimenez 7 months ago

      I have a galaxy note 5 i use for experiments with root which fascinates me to no end for some reason. But the wires from the connected battery broken off ( which is why it was given to me) and the battery is no where to be found. Ive grown tired of being bound to a wall so im trying to test out how i can use a usb cable and batteries such as the little 9v square batteries to keep it on while i walk around. Anyone that can help give me some ideas please email me with note 5 in the subject line i would really appreciate it. Thanks.

    • profile image

      chirag 7 months ago

      Sir my USB has pink white yellow and grey I want to make a wireless charger what wires should I use

    • profile image

      Bram 8 months ago

      i have an tomtom with an small monitor i want to use the end(what is used for in the car) to connect it to an usb so i can charge my cellphone, but an usb has green in it and the tomtom doesnt, is it important?

    • profile image

      Mikey 8 months ago

      I have a usb cord three wired copper white an red which r which

    • profile image

      Pranjal Trivedi 8 months ago

      My USB has 4 wires and now I can tell which has positive and which has negative charge . Thank you for information

    • profile image

      Daniel Gonzalez 8 months ago

      i have 4 cables a pink yellow white and light grey

    • profile image

      kinot 8 months ago

      hello sir .i have a logitech speaker without head connection.my mean is it is 3.5mm or usb male but its same own 4 wires.blue,green,black and white..i am aimmed blue is v+ and black is v- and connect it to power supply and led indicator work.white and green yes is data. But i found 2 extra wires coloured white and red bulked.what is it sir?

    • profile image

      Kent 8 months ago

      I have a USB cable with the colors Black,Brown, Orange and White. I want to connect to a 2.5mm female Jack. which two colours do I connect please.

    • profile image

      John Galoon 8 months ago

      I like the topic I need to learn more on USB cabling. I needed yo replace the usb socket / plug but failed because I needed to understand the color codes. Thanks. But I'm still having the same challenge.

    • profile image

      Abdul Shakoor 8 months ago

      Hi Mr Mark.

      Hope you're doing well.

      I have a small problem. Having read this post I thought you might help me.

      I have a laptop table below which are fixed two 5-volt fans that receive power from the USB port in the laptop.

      The problem is that the metallic piece of that USB cable that is inserted in the laptop is corroded. So I cut that corroded USB cable metallic piece and tried to attach another one. But I have failed in doing so when though I have connected the right type cords. i-e green with black and red with white and tried to test it with a battery as well. But that didn't work.

      Please help

    • profile image

      bjayanaresh 9 months ago

      How to check positive and negative

    • profile image

      Ronald 9 months ago

      Yes it is important to have positive and negative known wires ,but the ground is vital

    • profile image

      Amber 9 months ago

      I have a USB cable with pink light green and white. Very confused. Connecting to a new end with white red black and green?

    • profile image

      Boakye Barnabas 9 months ago

      Hi Mark, my USB cable wires are,yellow,white,light green,and ash colors.what is meaning?thank you

    • profile image

      Aman 9 months ago

      I have a headphone which has blue white red and blue color wires. So please tell me that which is positive and negative

    • profile image

      Tommy Anderson 9 months ago

      I'm trying to connect a micro USB (female to female), in order to connect my bluetooth controller to my cellphone, because the bluetooth isn't working. Firstly, is this possible? My problem is, I have one female end with red, green, white and black wires. The other female end has red, green and white wires, but there is no black wire. But there are two exposes wires without a color coding. Do you have any idea as to which ones I should connect? Do the two uncolored wires matter? Thanks for the help.

    • profile image

      Rajat C 10 months ago

      Hey i wanted to know can i use normal wires if i'm making my own USB cable

      thanks

    • profile image

      John 10 months ago

      i got a question. wiring a mouse from PS2 to USB. i manage to get power on butt he mouse doesn't receive data.

      ps2 wires are Black, Green, Yellow, Red. The USb wires are Green, Blue, Orange and white.

      the connections are Red-Blue, Black-orange, Green-Yellow, Green-white.

    • profile image

      Agterbosch 12 months ago

      None of this is right.. Blue is usually ground, not data-, green is always data+ in any color scheme, and white is data-..

      The correct scheme if you want to connect these 2 different colored wires together would be this:

      Red or orange = 5 V

      White or gold = Data−

      Green = Data+

      Black or blue = Ground

      So in other words, orange to red, white to white, green to green and blue to black

    • profile image

      Ycar 12 months ago

      Hi is it applicable to charger... my charger has 2ampere the wires are red and black only, but the charging pin is broken so i decided to change to other pin but the pin i was have are 4 color which is red black green and white ... how can i connect it

    • profile image

      Walt 12 months ago

      Hello Mark,

      My usb only has red, white, and green. Could you please tell me what the positive and negative are? I am trying to turn my childs swing from battery operated to wall charge.

    • profile image

      Walt 12 months ago

      Hello Mark,

      My usb only has red, white, and green. Could you please tell me what the positive and negative are? I am trying to turn my childs swing from battery operated to wall charge.

    • profile image

      Brandon Walker 12 months ago

      Hello mark, I'm looking for a temporary solution to my phone charging problem until i get it fixed. It's a Galaxy Note 3 and it seems that one of the pins inside the charging port has been bent/pushed back i think. I can see it near the back of the port when I look. Anyways, it currently charges if i use a wall charger and even charges when plugged into my PC as well as transfers files, but it charges significantly slower than it use to and it will not recognize most external power banks. They charge other phones but nothing happens when plugged into mine and the power banks eventually just turn off because they arent being used.

      In short, I'm wondering if I can modify one of my cables by removing a wire or rerouting the wire in order to either fix the external power bank issue or to increase the speed my phone charges back to it's normal speed. 2 questions in 1 but I've searched for days and asked in other places. this hub seems very informed and even if It my problem cannot be fixed, any insight would help alot, and I've already bookmarked this to read other articles. Thanks in advance

      (side note - some power banks work on the phone and some do not, even ones from the same brand.)

    • profile image

      Glenn 12 months ago

      I have a USB type C cable... Trying to do a power project. The four wires I have are loght Grey, Pastel Pink, Pastel Green, and White. Can you help me determine which two are the 5v Positive and the Negative colors? Plz and Thank You... :)

    • profile image

      mohd syazwan sahar 13 months ago

      hello, im want a ask.how i want to connect if their is 2 wire as red and black.. and i want connect with usb ports. which is black , red, green and white color. how i want to consider this to correctly connect it. hope for ur reply. thanks!

    • profile image

      louisianna 13 months ago

      i had a white usb cable and when i cut it open i have a pink wire and a white wire.

      which is which??

    • profile image

      Seth Tyler 13 months ago

      Hey I have a little problem. My Dog chewed my iPhone charger cord and I need to replace it with an old wire they were both iPhone. The one that my dog chewed was green red and white and the other charger is greeen red and black . Do I splice the white and black together ? Thank you!

    • profile image

      Argeneus 14 months ago

      My "other" proplem

      Is that after 2-3 months of modered use, my caple starts charging slower and slower... soon yes i end up with

      (Not detected - Detected - Not detected -Detected and so on) and always ends with Not detected

      I think the proplem is just whering down the copper by use.

      I think it's cutting corners on prize by manifactural proses..

      Maybe they need a better metal or metal mix or maybe use just a little more copper in the tupes... they know chargers and most Usb with mini usb end will move around alot more now day's

      *Hope u understood this, dont have time 4 spellcheck now

      cheers from Iceland

    • Mark Johann profile image
      Author

      Mark Johann 14 months ago from Italy

      Cloth wire is the support lace only and not a conductor. Please check your wires. I must be four wires. Red and Green are power wires. Red for positive and green for negative.

    • Mark Johann profile image
      Author

      Mark Johann 14 months ago from Italy

      I always believe green is the negative. Sometimes, it is black. Then pink wire is the positive which may sometimes be red.

    • profile image

      Mysteryneophyte@gmail.com 14 months ago

      hi mark,

      I have a usb cable with red, green, white and cloth like white wire. It also has a unshielded wire. I am wondering if I can make this cable a charge only cable? I want to get ride of the data cables, which are they?? Thanks, im lost here. Its for my samsung note 10.1...trying to see if I can get rid of the red x while charging so it doesn't take 24 hours.

    • profile image

      Michelle Weaver 14 months ago

      I bought a charger that is like 4ft. long for my cell phone. It has on the outer side's yellow & pink wires, the center has Lt blue (maybe Lt.green) and white.

      What is positive and negative?

    • Mark Johann profile image
      Author

      Mark Johann 14 months ago from Italy

      Hello there! Data wires are used to view videos from usb devices. Of course, you need power wires for that.

    • profile image

      RPierce 15 months ago

      I'm trying to hook up a security camera going usb, I would like to know what colors I can use to get video from my camera to my pc. The only wires I have from my camera are typical shield ground and one positive the wires I have on the usb are red, green, black and white along with the shielded

    • profile image

      Mikeshaver92 16 months ago

      I have a flat micro USB phone charger that has 4 wires 1 white and 3 clear I want to splice a normal charger on it with a red and black wire... how do I do that

    • profile image

      devin 16 months ago

      I have a I pod nano I'm trying to splice the wires and wire it back up using another USB but there are 3 wires in the charger to my I pod and only 2 to my USB witch ones are hot out of my I pod

    • profile image

      Ian bumoskey 16 months ago

      I have an hp keyboard model 9009. The end was torn or chewed off. I had a printer cord that was bad and I seen the keyboard had yellow and not black. Any tips

    • profile image

      jyhnas 17 months ago

      worked

    • profile image

      omf 17 months ago

      Hi Mark i ahve a very simple problem i hope. I have a modern speaker which you can sit the ipod on top but it also as rca jack if i want to connect a device to it: the device iwould like to connect to it my mac book but rca jack is not working. is there a way that i can splice a usb cord connect it to my computer and then splice that into the port for the ipod or even splice it into an rca jack

    • profile image

      mayo 18 months ago

      hello mate, i have a white usb cable with four cables inside, the colors are orange, white, brown and green i would like to connect them to a creative speakers model SB5250, I would like to know which is the positive, ground and data, how bout any ideas to hook them up via USB to power them up and to avoid that large power connection heavy cord

    • profile image

      Maurice Patterson 18 months ago

      I have a phone charger cord that I,m trying to connect ,that broke, but one side of the cord,have a red and black wire on one side and the other side have a red, white, black, green and white on the other side that I,m trying to connect them together can you help me ? Please

    • profile image

      Myoshi 18 months ago

      I would like to know how to connect my phone to my tv I've been trying to invent my own cord so I cut my end off my HDMI and exposed. The color cords then I cut the end off of my USB cord and tried to connect them together I'm trying to watch tv using my phone data I don't have wifi. But do I need a power cord also please help me I'm always trying to do something hook up a gadget. But I want to do it right

    • profile image

      Chiamaka 18 months ago

      Plss mark I want to connect 2 USB CODES. android charger. One of it has green red black nd white wires. D oda has yellow, thick Grey, light grey nd white

    • profile image

      Yohn 19 months ago

      Hi....i want to make a lamp using my usb but not sure which wires to connect..my colour codes are red,black,white and green

    • profile image

      takudzwa 20 months ago

      my mouse have red ,orange, green and white

    • profile image

      Vikram Sagar 20 months ago

      what is D,C,V,G in optical mouse pcb....????

      i have broken all 4 wires (white,orange,blue,green) now i m having problem with

      colour code....kindly help...

    • profile image

      lauralee45 20 months ago

      how would i go about splicing two male ends of usb to a female to run two computers off usb wifi?

    • profile image

      Tim 21 months ago

      Can anyone help guide me to wiring without the use of meters and such?

      I have a ethernet chord that has ethernet and usb connection only on one end. I need the usb end to work, a mouse chewed the wires beyond repair.So i'm trying to use an old usb end on it, but the old one i'm trying to wire is just plain colored black, green, red and white. but the usb part on the ethernet chord is blue, striped blue & white, brown, striped brown & white. any help would be greatly appreciated. And "please", email only help. i'm using a library pc. my email is born2big@yahoo.com

    • profile image

      Kevin lam 23 months ago

      Hi, i have a cable that has a red, yellow, grey and a wire that is transparent , what is the arrengment?

    • profile image

      Dani 2 years ago

      Hello, I am making a solar panel phone charger and I have 2 wires (the red + and black -) wires that need to be attached to my phone charger that I have cut. However, I noticed that there are 4 wires. I just attached the red to the red and black to the black because I assumed that those are the ones that help carry the electricity. What do I with the green and white data wires. Do data wire carry electricity that help charge things? By not connecting them to anything is the phone not receiving all of the electricity? Also I don'r really understand what ground wire means; does it just mean the negative end of the wire that carries electricity? Thank you

    • profile image

      Angad 2 years ago

      Hii Sir,

      I am trying to make Power bank with Data Code. So Pls help me for making it. If your give me answer on my Email Address that is good for me. My email address is teamsamram@gmail.com

    • profile image

      SAURABH SRIVASTAVA 2 years ago

      intex keyboard,red,green,yellow and white,which wire will go to which slder joint?thanks...

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      light pink is the positive and light green is the negative wire

    • profile image

      gavin mitchell 3 years ago

      hey usb has the color white, grey, light pink and light green what are the positive negative and the + an - wire

    • profile image

      SIDDHANT 3 years ago

      HEY MARK

      I have a usb keyboard it shows (v,g,d+,d-)pls tell me how to connect the 4 wires i.e blue ,white, orange ,and green to them.

    • profile image

      Narek 3 years ago

      I just needed this to fix my wireless mouse wire that the puppy chewed through. I figured since I only really use it for charging I don't need all wires to be connected so I just spliced the black and red together and it works! Thanks.

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Data wires are not important in charging. Thank you.

    • profile image

      john 3 years ago

      If I'm wanting to simply charge my phone. As long as I have 5v and ground will it charge or do I have to connect data wires. Or is that just to simply transfer data.

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Red is the positive wire which is to be paired with the negative wire and I believe it is the black wire. Some USB set of wires have white wires in negative but just try first the black then if not white. The rest will be the data wires. Keep in touch for more inquiry.

    • profile image

      Shrekangry 3 years ago

      Pleaae help me i want to connect the wires of my usb to the adapter which have 5v output the problem is the adapter have only one wire black but the usb wire have 4 wires black white red and blue can i attach all the wires together i want to recharge my galaxy note at 5 v so plz help me

    • profile image

      Cameron 3 years ago

      My USB has yellow red green and white wires. Can't find any colour codes for this. Would appreciate some help. Thanks☺

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Does it use a USB cord wire?

    • profile image

      jamie 3 years ago

      How can i Were an Apple charger end to an aux Plus so it wi will work on my tv

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Hi Madu,

      Okay, it only uses two wires as far as my knowledge is concern. That, if you only ask for its charging system. If you ask for data transfer, it uses all of its terminal to function.

      Please specify your question if I have not answered it well. Thank you.

    • profile image

      Madu 3 years ago

      Hi Mark,

      These days most of electronic device chargers are connected with USB cables. Would you please explain the wiring on such a power adaptor? For example Samsung S5 phone charger which connect to phone via mini usb port.

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Hi Cheree,

      Red is the positive wire there with 5 volts DC and I suggest testing the grey wire for the negative wire. I am not so sure but just try it. It is not that harmful to your device because it has only 5 volts. The rest of the wires are data wires. Thank you.

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      Hello Peter Mac,

      Our USB voltage in all CPU on this planet has only 5 volts DC so you need 12 Volts DC. It is true you can it spin but this spin is not sufficient. It is only lower to the true power of your 12 Volts motor. Now, I want to suggest if you really like to use your CPU voltage to support your 12V motor, open your CPU casing then locate the power supplies wires. This four wires usually in a set of four wires, the two black wires, yellow wire and the red wire. The negative is the black wires of course, the red is the 5 volts wire and the one you are looking for is the 12 volts wires in yellow wire color.

      Remove the insulator by skinning the wires and tap the two wires on your motor. Don't forget to reinsulate the wires with electrical tape.

      Thank you.

    • Mark Johann profile image
      Author

      Mark Johann 3 years ago from Italy

      In my experience, I cannot say it is the mouse wire, the green, white-green, blue, white-blue and white. It has something to do with the mouse driver on your motherboard. The best thing to do is to uninstall and reinstall the motherboard drivers. Thank you. Keep in touch for more inquiry.