An electrical connector includes an insulating body, and a shell body. The insulating body includes a body, pivoting concave ditches located at two sides of end of the body and formed along horizontal directions, and circular rotating angles located at the top rim of the two sides of the end of the body. The body receives a plurality of conducting pins. The shell body includes a top wall, side walls, pivoting convex columns, and a blocking element. The pivoting convex column is located in the pivoting concave ditch. By moving the pivoting convex column in the pivoting concave ditch, the shell body moves. By contacting the blocking element with the arc of the circular rotating angle, when the shell body rotates to a specified angle with the insulting body, the shell body moves along the side wall of the shell body.