A hand tool includes a body and a ratchet head which is pivotably connected to the body. A pawl and a controller are connected to the body. The ratchet head is engaged with the pawl by first and second engaging teeth. The controller has a recess which has two curved faces. The controller has two grooves and each groove has a first stop face and a second stop face. The first and second stop faces contact the two curved faces. The pawl is not moveable, and the first engaging teeth are engaged with the second engaging teeth so as to fix the ratchet head relative to the body at an angle. When the two curved faces are moved to face the two grooves, the controller is moved, and the ratchet head is pivotable relative to the body.