An electrical connector includes a base portion, a tail portion extending from a first side of the base portion, a serpentine portion having a first end connected to a second side of the base portion opposite to the first side, a movable head portion connected to a second end of the serpentine portion, and a housing in which an accommodation chamber is formed to accommodate the serpentine portion. The housing has a first end connected with the base portion and a second end provided with a limiting portion confining the serpentine portion within the accommodation chamber. The head portion is movable so as to pass through the limiting portion. The electrical connector is made of a single piece of metal.