Poly(3,4-ethylenedioxythiophene):poly-styrene sulfonate (PEDOT:PSS) is commonly used as a hole-transport material in optoelectronic devices such as organic and perovskite-based solar cells and light-emitting diodes. Moreover, PEDOT:PSS is suitable for fabricating flexible and roll-to-roll devices by solution processing. However, PEDOT:PSS has hygroscopic properties, and the water molecules it attracts can damage the active layer of de-vices, leading to reduced device stability. In this study, we develop a water-stable hole transport layer (HTL) in perovskite light-emitting diodes (PeLEDs) and organic light-emitting diodes (OLEDs) via a simple and effective method, which involves the modification of PEDOT:PSS with 2-pentacosa-10,12-diynamidoethylsulfate as a photo-crosslinking agent. Experimental results show that devices with the developed HTL show greater long-term stability than PeLEDs and OLEDs based on pristine PEDOT:PSS.