An endoscope device having illumination windows (41A, 41B) for emitting illumination light and an observation window for observing a subject, at a front end of an endoscope insertion portion inserted into an examined object, the endoscope device comprising: a light source unit having a light source and a dimming control unit that performs dimming control of light from the light source to supply a desired light amount of illumination light to the illumination windows; a lens unit; an imaging unit that photographs the observation image obtained from the lens unit to output a photographed image; said lens unit having a zoom tool of which a focus distance is variable to form an observation image, characterized in that the endoscope device further comprises a focus distance switching unit being configured to perform switching to any mode of a far-focus mode in which the focus distance of the lens unit is set at a focusing location of the subject which is farthest from the observation window and a near-focus mode in which the focus distance is set at an focusing location of the subject which is closest from the observation window according to light amount information of the illumination light and luminance distribution information of the output photographed image, wherein, with respect to an examination line on the photographed image corresponding to arrangement directions of the illumination windows and the observation window at the front end of the endoscope insertion portion, the focus distance switching unit detects a luminance distribution of each pixel of the examination line to obtain an inter-luminance ratio with respect to luminance values of at least two locations on the examination line, to compare the luminance ratio with a predetermined threshold, so that when the luminance ratio is equal to or more than the threshold, it is determined that the subject is at the near-focus location and when the luminance ratio is less than the threshold, it is determined that the subject is at the far-focus location. a light source unit having a light source and a dimming control unit that performs dimming control of light from the light source to supply a desired light amount of illumination light to the illumination windows; a lens unit; an imaging unit that photographs the observation image obtained from the lens unit to output a photographed image; said lens unit having a zoom tool of which a focus distance is variable to form an observation image, characterized in that the endoscope device further comprises a focus distance switching unit being configured to perform switching to any mode of a far-focus mode in which the focus distance of the lens unit is set at a focusing location of the subject which is farthest from the observation window and a near-focus mode in which the focus distance is set at an focusing location of the subject which is closest from the observation window according to light amount information of the illumination light and luminance distribution information of the output photographed image, wherein, with respect to an examination line on the photographed image corresponding to arrangement directions of the illumination windows and the observation window at the front end of the endoscope insertion portion, the focus distance switching unit detects a luminance distribution of each pixel of the examination line to obtain an inter-luminance ratio with respect to luminance values of at least two locations on the examination line, to compare the luminance ratio with a predetermined threshold, so that when the luminance ratio is equal to or more than the threshold, it is determined that the subject is at the near-focus location and when the luminance ratio is less than the threshold, it is determined that the subject is at the far-focus location. a focus distance switching unit being configured to perform switching to any mode of a far-focus mode in which the focus distance of the lens unit is set at a focusing location of the subject which is farthest from the observation window and a near-focus mode in which the focus distance is set at an focusing location of the subject which is closest from the observation window according to light amount information of the illumination light and luminance distribution information of the output photographed image, wherein, with respect to an examination line on the photographed image corresponding to arrangement directions of the illumination windows and the observation window at the front end of the endoscope insertion portion, the focus distance switching unit detects a luminance distribution of each pixel of the examination line to obtain an inter-luminance ratio with respect to luminance values of at least two locations on the examination line, to compare the luminance ratio with a predetermined threshold, so that when the luminance ratio is equal to or more than the threshold, it is determined that the subject is at the near-focus location and when the luminance ratio is less than the threshold, it is determined that the subject is at the far-focus location.