A power tool comprises a handle, a head pivotally coupling to the handle, an operating member disposed on the head, a positioning element installed in the head and biased with an elastic element for fixing the head in a desired position relative to the handle. The operating member has a pressing portion and a receiving portion. While the operating member is in a first position, the pressing portion of the operating member abuts against the positioning element to press the positioning element to engage to the handle so that the head is fixed in position relative to the handle; while the operating member is in a second position, the elastic element is released to push the positioning element toward the receiving portion of the operating member so that the positioning element disengages from the handle and the head can pivot relative to the handle freely.