A hydraulic excavator comprising: a lower track structure; an upper swing structure provided above the lower track structure; an operation room provided in front of the upper swing structure; a notification device (24, 27, 28) provided in the operation room; a seatbelt provided in the operation room; and a seatbelt detection device configured to detect whether or not the seatbelt is worn, characterized in that the hydraulic excavator further comprises a camera (14 - 16) that monitors surroundings of the upper swing structure; and a controller that detects presence/absence of a moving object from an image of the camera (14 - 16) and outputs, in a case where the moving object is detected, an alarm through the notification device (24, 27, 28); and in that the controller is configured to output, in a case where the moving object is detected and wearing of the seatbelt is detected by the seatbelt detection device, a first alarm through the notification device (24, 27, 28), output, in a case where the moving object is not detected and non-wearing of the seatbelt is detected by the seatbelt detection device, a second alarm through the notification device (24, 27, 28), and output, in a case where the moving object is detected and non-wearing of the seatbelt is detected by the seatbelt detection device, the second alarm preferentially over the first alarm through the notification device (24, 27, 28). a lower track structure; an upper swing structure provided above the lower track structure; an operation room provided in front of the upper swing structure; a notification device (24, 27, 28) provided in the operation room; a seatbelt provided in the operation room; and a seatbelt detection device configured to detect whether or not the seatbelt is worn, characterized in that the hydraulic excavator further comprises a camera (14 - 16) that monitors surroundings of the upper swing structure; and a controller that detects presence/absence of a moving object from an image of the camera (14 - 16) and outputs, in a case where the moving object is detected, an alarm through the notification device (24, 27, 28); and in that the controller is configured to output, in a case where the moving object is detected and wearing of the seatbelt is detected by the seatbelt detection device, a first alarm through the notification device (24, 27, 28), output, in a case where the moving object is not detected and non-wearing of the seatbelt is detected by the seatbelt detection device, a second alarm through the notification device (24, 27, 28), and output, in a case where the moving object is detected and non-wearing of the seatbelt is detected by the seatbelt detection device, the second alarm preferentially over the first alarm through the notification device (24, 27, 28). output, in a case where the moving object is detected and wearing of the seatbelt is detected by the seatbelt detection device, a first alarm through the notification device (24, 27, 28), output, in a case where the moving object is not detected and non-wearing of the seatbelt is detected by the seatbelt detection device, a second alarm through the notification device (24, 27, 28), and output, in a case where the moving object is detected and non-wearing of the seatbelt is detected by the seatbelt detection device, the second alarm preferentially over the first alarm through the notification device (24, 27, 28).