A Schiff base is prepared by the reaction of 7-hydroxy-1-naphthaldehyde with 4-aminoben-zenesulfonamide. The prepared Schiff base L4 compound was characterized by 1H NMR, Mass and FTIR spectroscopies. The optimization of the prepared L4 compound is carried out via DFT-B3LYP and 6-311G (d,p). The nonlinear optical (NLO) properties of the prepared L4 compound are investigated theoretically by the calculation of some quantum chemical descriptors (QCDs). TD-DFT via B3LYP and 6-311G calculations are used to study L4 compound UV-vis. spectrum at the same theoretical method and level. The L4 compound NLO properties are examined via irradiation with a CW laser beam, where the nonlinear index of refraction (NLIR) is calculated via diffraction patterns (DPs) and the Z-scan and as high as 4.579 × 10-11 m2/W of NLRI is obtained. Static (S) and dynamic (D) all optical switching (AOS) are examined using two CW and pulsed laser beams of wavelengths (473 and 532) nm.