A semiconductor device comprising: a semiconductor structure including a first conductivity type semiconductor layer, a second conductivity type semiconductor layer, an active layer disposed between the first conductivity type semiconductor layer and the second conductivity type semiconductor layer, a plurality of first recesses disposed up to some region of the first conductivity type semiconductor layer by passing through the second conductivity type semiconductor layer and the active layer, and a second recess disposed between the plurality of first recesses; a plurality of first electrodes disposed inside the plurality of first recesses and electrically connected to the first conductivity type semiconductor layer; a plurality of second electrodes disposed on a lower surface of the semiconductor structure and electrically connected to the second conductivity type semiconductor layer; and a reflective layer disposed inside the second recess, wherein the semiconductor structure generates light in an ultraviolet wavelength range; the sum of areas of the plurality of first recesses and an area of the second recess is in a range of 60% or less relative to a maximum cross-sectional area of the semiconductor structure in a first direction; the areas of the plurality of first recesses and the area of the second recess are areas formed on a lower surface of the semiconductor structure, the first direction is a direction perpendicular to a thickness direction of the semiconductor structure, and wherein a first area in which the plurality of first electrodes are in contact with the first conductivity type semiconductor layer is in a range of 6.0% to 11.0% relative to the maximum cross-sectional area of the semiconductor structure in the first direction, and wherein a second area in which the plurality of second electrodes are in contact with the second conductive semiconductor layer is in a range of 40% to 60% relative to the maximum cross-sectional area of the semiconductor structure in the first direction. a semiconductor structure including a first conductivity type semiconductor layer, a second conductivity type semiconductor layer, an active layer disposed between the first conductivity type semiconductor layer and the second conductivity type semiconductor layer, a plurality of first recesses disposed up to some region of the first conductivity type semiconductor layer by passing through the second conductivity type semiconductor layer and the active layer, and a second recess disposed between the plurality of first recesses; a plurality of first electrodes disposed inside the plurality of first recesses and electrically connected to the first conductivity type semiconductor layer; a plurality of second electrodes disposed on a lower surface of the semiconductor structure and electrically connected to the second conductivity type semiconductor layer; and a reflective layer disposed inside the second recess, wherein the semiconductor structure generates light in an ultraviolet wavelength range; the sum of areas of the plurality of first recesses and an area of the second recess is in a range of 60% or less relative to a maximum cross-sectional area of the semiconductor structure in a first direction; the areas of the plurality of first recesses and the area of the second recess are areas formed on a lower surface of the semiconductor structure, the first direction is a direction perpendicular to a thickness direction of the semiconductor structure, and wherein a first area in which the plurality of first electrodes are in contact with the first conductivity type semiconductor layer is in a range of 6.0% to 11.0% relative to the maximum cross-sectional area of the semiconductor structure in the first direction, and wherein a second area in which the plurality of second electrodes are in contact with the second conductive semiconductor layer is in a range of 40% to 60% relative to the maximum cross-sectional area of the semiconductor structure in the first direction.