Chemical synthesis, structural analysis, theoretical calculations and optical properties exploration of (E)-2-((E)-(4-nitrobenzylidene)hydrazono)-3-phenyl-4-thiazolidinone 7 (C16H12N4O3S) are introduced. The synthesis method involves three steps. The applying of 1H and 13C NMR, infrared radiation (IR), mass and UV–visible spectroscopies and melting point (m.p) confirmed the expected compound structure. Optimization of the compound geometrical structure is carried out via the theoretical calculation and evaluation of its nonlinear optical (NLO) properties. The NLO properties of the synthesized 4-thiazolidinone derivative 7 are studied under the irradiation with visible and single transverse mode laser beam, through the determination of the nonlinear refractive index (NRI) via the diffraction ring patterns (DRPs) and the Z-scan together with optical limiting. Using two visible laser beams, the all-optical switching (AOS) in 4-thiazolidinone derivative 7 is studied too.