A ratchet wrench includes a handle having a receiving hole, a ratchet wheel rotatably mounted in the handle, a direction controller pivotally mounted in the handle and provided at a periphery thereof with a guide groove, a pawl connected with the direction controller and engaged with the ratchet wheel, and a positioning member. When the direction controller is in a first position, a positioning ball of the positioning member is slidable to the receiving hole of the handle through the guide groove. When the direction controller is turned to a second position, the positioning ball is supported by a spring and engaged with a positioning notch of the direction controller so as to hole the direction controller in position.