A lighting device arranged to be attached to a mounting surface of an object, the lighting device comprising an LED strip, the LED strip comprising: - an elongated carrier with an upper surface having a first upper surface portion and a second upper surface portion located next to the first upper surface portion in the direction of elongation of the elongated carrier, - a plurality of light-emitting diodes arranged on the first upper surface portion, the plurality of light-emitting diodes being encapsulated with a light-transmissive encapsulant, the light-transmissive encapsulant being arranged to provide an optical effect chosen from the group consisting of refraction, diffraction, reflection, diffusion and conversion, and - an attachment component for attaching the lighting device to the mounting surface, wherein the attachment component is provided on the second upper surface portion, wherein the attachment component comprises an adhesive surface that faces in at least one of a first direction and a second direction, the first direction being parallel to the normal of the upper surface, and the second direction being perpendicular to the normal of the upper surface and to the direction of elongation of the elongated carrier, wherein the attachment component has a first attachment component part with a first adhesive surface portion facing the first direction, the first adhesive surface portion being located at a first height ( h) from the upper surface in the first direction, and wherein the light-transmissive encapsulant has a side surface parallel to the first direction and facing the second upper surface portion, the side surface having a side surface dimension ( d) in the first direction, and wherein the side surface dimension ( d) is larger than the first height ( h). - an elongated carrier with an upper surface having a first upper surface portion and a second upper surface portion located next to the first upper surface portion in the direction of elongation of the elongated carrier, - a plurality of light-emitting diodes arranged on the first upper surface portion, the plurality of light-emitting diodes being encapsulated with a light-transmissive encapsulant, the light-transmissive encapsulant being arranged to provide an optical effect chosen from the group consisting of refraction, diffraction, reflection, diffusion and conversion, and - an attachment component for attaching the lighting device to the mounting surface, wherein the attachment component is provided on the second upper surface portion, wherein the attachment component comprises an adhesive surface that faces in at least one of a first direction and a second direction, the first direction being parallel to the normal of the upper surface, and the second direction being perpendicular to the normal of the upper surface and to the direction of elongation of the elongated carrier, wherein the attachment component has a first attachment component part with a first adhesive surface portion facing the first direction, the first adhesive surface portion being located at a first height ( h) from the upper surface in the first direction, and wherein the light-transmissive encapsulant has a side surface parallel to the first direction and facing the second upper surface portion, the side surface having a side surface dimension ( d) in the first direction, and wherein the side surface dimension ( d) is larger than the first height ( h). wherein the attachment component is provided on the second upper surface portion, wherein the attachment component comprises an adhesive surface that faces in at least one of a first direction and a second direction, the first direction being parallel to the normal of the upper surface, and the second direction being perpendicular to the normal of the upper surface and to the direction of elongation of the elongated carrier, wherein the attachment component has a first attachment component part with a first adhesive surface portion facing the first direction, the first adhesive surface portion being located at a first height ( h) from the upper surface in the first direction, and wherein the light-transmissive encapsulant has a side surface parallel to the first direction and facing the second upper surface portion, the side surface having a side surface dimension ( d) in the first direction, and wherein the side surface dimension ( d) is larger than the first height ( h).