Provided is a work machine which is capable of accurately preventing a work device from interfering with a load receiving member without separately using a dedicated device. A work machine includes a controller which at least controls rotating of an upper rotating body and vertical movement of a boom in accordance with operation by an operator. The controller controls either a boom-up operation and a rotating operation of the upper rotating body such that a work device is prevented from interfering with a load receiving member in operation of an operator at subsequent lifting and rotating, operation based on part of a locus at a distal end side of the work device at least for one lifting and rotating operation.