Topical ocular drug delivery faces several challenges due to the eye's unique anatomy and physiology. Physiological barriers, tear turnover, and blinking hinder the penetration of drugs through the ocular mucosa. In this context, nanoparticles offer several advantages over traditional eye drops. Notably, they can improve drug solubility and bioavailability, allow for controlled and sustained drug release, and can be designed to specifically target ocular tissues, thus minimizing systemic exposure. This study successfully designed and optimized PLGA and PCL nanoparticles for delivering baricitinib (BTB) to the eye using a factorial design, specifically a three-factor at five-levels central rotatable composite 23+ star design. The nanoparticles were small in size so that they would not cause discomfort when applied to the eye. They exhibited low polydispersity, had a negative surface charge, and showed high entrapment efficiency in most of the optimized formulations. The Challenge Test assessed the microbiological safety of the nanoparticle formulations. An ex vivo permeation study through porcine cornea demonstrated that the nanoparticles enhanced the permeability coefficient of the drug more than 15-fold compared to a plain solution, resulting in drug retention in the tissue and providing a depot effect. Finally, the in vitro ocular tolerance studies showed no signs of irritancy, which was further confirmed by HET-CAM testing.