Method for encapsulating an optoelectronic component, comprising the method steps: A) providing the optoelectronic component comprising the following method sub-steps: A1) providing a substrate, A1') applying a conductive transparent layer to the substrate, A2) applying a first electrode layer to the conductive transparent layer, A3) applying an organic functional layer to the first electrode layer, A4) applying a second electrode layer to the organic functional layer, wherein a layer stack is formed comprising the first electrode layer, the second electrode layer and the organic functional layer, which layer stack has major surfaces and side surfaces A5) applying a first encapsulating layer to the second electrode layer, wherein a cover plate made of glass with a main surface facing away from the layer stack and with side surfaces is used for the first encapsulation layer, B) targeted deposition of a diffusion barrier for protection against environmental influences by means of an atmospheric pressure plasma on the side surfaces of the layer stack and on parts of the side surfaces of the cover plate, wherein - a plasma jet is used for the targeted deposition on the side surfaces of the layer stack and on parts of the side surfaces of the cover plate, - the main surface of the cover plate facing away from the layer stack remains free of the diffusion barrier, and - the optoelectronic component is encapsulated in such a way that no cavity is formed between the diffusion barrier and the component. A) providing the optoelectronic component comprising the following method sub-steps: A1) providing a substrate, A1') applying a conductive transparent layer to the substrate, A2) applying a first electrode layer to the conductive transparent layer, A3) applying an organic functional layer to the first electrode layer, A4) applying a second electrode layer to the organic functional layer, wherein a layer stack is formed comprising the first electrode layer, the second electrode layer and the organic functional layer, which layer stack has major surfaces and side surfaces A5) applying a first encapsulating layer to the second electrode layer, wherein a cover plate made of glass with a main surface facing away from the layer stack and with side surfaces is used for the first encapsulation layer, A1) providing a substrate, A1') applying a conductive transparent layer to the substrate, A2) applying a first electrode layer to the conductive transparent layer, A3) applying an organic functional layer to the first electrode layer, A4) applying a second electrode layer to the organic functional layer, wherein a layer stack is formed comprising the first electrode layer, the second electrode layer and the organic functional layer, which layer stack has major surfaces and side surfaces A5) applying a first encapsulating layer to the second electrode layer, wherein a cover plate made of glass with a main surface facing away from the layer stack and with side surfaces is used for the first encapsulation layer, B) targeted deposition of a diffusion barrier for protection against environmental influences by means of an atmospheric pressure plasma on the side surfaces of the layer stack and on parts of the side surfaces of the cover plate, - a plasma jet is used for the targeted deposition on the side surfaces of the layer stack and on parts of the side surfaces of the cover plate, - the main surface of the cover plate facing away from the layer stack remains free of the diffusion barrier, and - the optoelectronic component is encapsulated in such a way that no cavity is formed between the diffusion barrier and the component.