A safety apparatus installable on a work machine including a lower traveling body capable of traveling on the ground and an upper revolving body mounted on the lower traveling body so as to be revolvable, the safety apparatus comprising: an obstacle sensor (61 to 64) configured to be provided in a specific portion of the upper revolving body to detect an obstacle around the work machine; a revolving angle detector configured to detect a revolving angle (θ) of the upper revolving body to the lower traveling body; an upper-side coordinate position calculation section configured to calculate an upper-side coordinate position that is a position of the obstacle detected by the obstacle sensor (61 to 64), the position being a position in a coordinate system using the upper revolving body as a reference; a lower-side judgment area setting section configured to set a lower-side judgment area for judging an approach of the obstacle at least in a periphery of the lower traveling body using the lower traveling body as a reference; a coordinate transformation section configured to transform one position of the upper-side coordinate position and a position of the lower-side judgment area into a position in a coordinate system to which the other position of the upper-side coordinate position and the position of the lower-side judgment area belongs, based on the revolving angle (θ) detected by the revolving angle detector, to thereby unify a coordinate system for specifying the position of the obstacle and a coordinate system for specifying the position of the lower-side judgment area; a lower-side approach judgment section configured to judge whether or not the obstacle exists within the lower-side judgment area in the coordinate system unified by the coordinate transformation section; and a safety operation command section configured to output a safety operation command for making the work machine perform a safety operation when the lower-side approach judgment section judges that the obstacle exists within the lower-side judgment area, characterized in that the coordinate transformation section is configured to transform the upper-side coordinate position into a lower-side coordinate position using the lower traveling body as a reference; the lower-side approach judgment section is configured to judge whether or not the lower-side coordinate position is a position within the lower-side judgment area; and the safety operation command section is configured to output the safety operation command when the lower-side approach judgment section judges that the lower-side coordinate position is a position within the lower-side judgment area. an obstacle sensor (61 to 64) configured to be provided in a specific portion of the upper revolving body to detect an obstacle around the work machine; a revolving angle detector configured to detect a revolving angle (θ) of the upper revolving body to the lower traveling body; an upper-side coordinate position calculation section configured to calculate an upper-side coordinate position that is a position of the obstacle detected by the obstacle sensor (61 to 64), the position being a position in a coordinate system using the upper revolving body as a reference; a lower-side judgment area setting section configured to set a lower-side judgment area for judging an approach of the obstacle at least in a periphery of the lower traveling body using the lower traveling body as a reference; a coordinate transformation section configured to transform one position of the upper-side coordinate position and a position of the lower-side judgment area into a position in a coordinate system to which the other position of the upper-side coordinate position and the position of the lower-side judgment area belongs, based on the revolving angle (θ) detected by the revolving angle detector, to thereby unify a coordinate system for specifying the position of the obstacle and a coordinate system for specifying the position of the lower-side judgment area; a lower-side approach judgment section configured to judge whether or not the obstacle exists within the lower-side judgment area in the coordinate system unified by the coordinate transformation section; and a safety operation command section configured to output a safety operation command for making the work machine perform a safety operation when the lower-side approach judgment section judges that the obstacle exists within the lower-side judgment area, characterized in that the coordinate transformation section is configured to transform the upper-side coordinate position into a lower-side coordinate position using the lower traveling body as a reference; the lower-side approach judgment section is configured to judge whether or not the lower-side coordinate position is a position within the lower-side judgment area; and the safety operation command section is configured to output the safety operation command when the lower-side approach judgment section judges that the lower-side coordinate position is a position within the lower-side judgment area.