A tool with a pivoting head is shown. The tool includes a locking mechanism that allows the angular position of the head to be locked securely in place once selected by a user. The locking mechanism may be used with a variety of tools, such as ratchet wrenches, that allow for repositioning of the head relative to the handle of the tool.