A tool rack includes two fixed members and two movable members movably received in the fixed members. The two movable members are connected to and controlled by a locking device. Each fixed member has a plurality of a first protrusions and each first protrusion has an open top. Each movable member has a second protrusion and a third protrusions, both of which are movably engaged with the open tops of the first protrusions. Tools are clamped by the first and second protrusions when the locking device is in the locked position. The second protrusions are moved away from the first protrusion, and the third protrusions push the tool out from the recess when the locking device is in the unlock position.