A universal serial bus adapter includes an adapter board, a sliding element, a receiving cover, and a pivoting element. The adapter board includes a main board, a golden finger board extending from an end of the main board, and a number of signal pins arranged on the main board. The golden finger board includes a number of golden fingers attached on the golden finger board and correspondingly electrically connected to the signal pins. The sliding element includes a main body slidably mounted to the signal pins. The receiving cover is operable to receive the main board and the main body, with the golden finger board exposed outside of the receiving cover. The pivoting element includes a board pivotally mounted on the receiving cover.