For nitride-based InGaN and AlGaN quantum well (QW) LEDs, the potential fluctuations caused by natural alloy disorders limit the lateral intra-QW carrier diffusion length and current spreading. The diffusion length mainly impacts the overall LED efficiency through sidewall nonradiative recombination, especially for $mu$LEDs. In this paper, we study the carrier lateral diffusion length for nitride-based green, blue, and ultraviolet C (UVC) QWs in three dimensions. We solve the Poisson and drift-diffusion equations in the framework of localization landscape theory. The full three-dimensional model includes the effects of random alloy composition fluctuations and electric fields in the QWs. The dependence of the minority carrier diffusion length on the majority carrier density is studied with a full three-dimensional model. The results show that the diffusion length is limited by the potential fluctuations and the recombination rate, the latter being controlled by the polarization-induced electric field in the QWs and by the screening of the internal electric fields by carriers.