A light emitting device comprising: an n-type semiconductor layer comprising a first area and a second area in a plane; an n-type contact layer disposed on the n-type semiconductor layer and having a first thickness in the first area and a second thickness in the second area; an undoped semiconductor layer disposed on the n-type contact layer having the first thickness in the first area; an active layer disposed on the undoped semiconductor layer in the first area; a p-type semiconductor layer disposed on the active layer in the first area; a first electrode disposed on the n-type contact layer having the second thickness in the second area; and a second electrode disposed on the p-type semiconductor layer, wherein the n-type contact layer forms a single layer, the undoped semiconductor layer has a thickness of 10 nm to 300 nm; characterized in that a thickness from the top surface of the p-type semiconductor layer to the top surface of the n-type contact layer in the second area is 800 nm to 1300 nm; in that a height difference (t) between the top surface of the n-type contact layer in the first area and the top surface of the n-type contact layer in the second area is 100 nm to 300 nm; in that:the p-type semiconductor layer comprises a first semiconductor layer having a first dopant concentration, a second semiconductor layer on the first semiconductor layer and having a second dopant concentration, a third semiconductor layer on the second semiconductor layer and having a third dopant concentration, and a fourth semiconductor layer on the third semiconductor layer and having a fourth dopant concentration; the second dopant concentration has a smaller value than the first dopant concentration and the third dopant concentration; in that the fourth dopant concentration has a greater value than the third dopant concentration, and in that it further comprises a crystal control layer under the n-type semiconductor layer, the crystal control layer including an AlGaN/GaN layer stacked structure. an n-type semiconductor layer comprising a first area and a second area in a plane; an n-type contact layer disposed on the n-type semiconductor layer and having a first thickness in the first area and a second thickness in the second area; an undoped semiconductor layer disposed on the n-type contact layer having the first thickness in the first area; an active layer disposed on the undoped semiconductor layer in the first area; a p-type semiconductor layer disposed on the active layer in the first area; a first electrode disposed on the n-type contact layer having the second thickness in the second area; and a second electrode disposed on the p-type semiconductor layer, wherein the n-type contact layer forms a single layer, the undoped semiconductor layer has a thickness of 10 nm to 300 nm; characterized in that a thickness from the top surface of the p-type semiconductor layer to the top surface of the n-type contact layer in the second area is 800 nm to 1300 nm; in that a height difference (t) between the top surface of the n-type contact layer in the first area and the top surface of the n-type contact layer in the second area is 100 nm to 300 nm; in that:the p-type semiconductor layer comprises a first semiconductor layer having a first dopant concentration, a second semiconductor layer on the first semiconductor layer and having a second dopant concentration, a third semiconductor layer on the second semiconductor layer and having a third dopant concentration, and a fourth semiconductor layer on the third semiconductor layer and having a fourth dopant concentration; the second dopant concentration has a smaller value than the first dopant concentration and the third dopant concentration; in that the fourth dopant concentration has a greater value than the third dopant concentration, and in that it further comprises a crystal control layer under the n-type semiconductor layer, the crystal control layer including an AlGaN/GaN layer stacked structure.