A pipe connector includes a casing, a valve block mounted in the first end of the casing and movable between a close position and an open position and normally supported in the close position by a spring inside the casing, a locking block holder mounted in the second end of the casing and movable between a locking position and an unlocking position and normally supported in the locking position by a spring inside the casing, and locking blocks transversely mounted in the locking block holder and movable with the locking block holder along a tapered inside all portion of the casing to lock/unlock a pipe that is inserted into the locking block holder to move the valve block to the open position.