This paper introduces a novel, modular nanosecond pulsed electric field (nsPEF) generator designed to address some of the critical challenges of the generation of high-voltage pulses with short durations, down to a few ns, while maintaining a low output impedance, relaxing characterization and impedance matching of the load requirements. The proposed system architecture, featuring a multilevel topology, a digital control platform, and high performance SiC power switches with custom GaN drivers, enables the generation of high-voltage and high-current pulses achieving switching times of hundreds of picoseconds. By leveraging the capabilities of GaN and SiC transistors, the generator delivers precise control over the main pulse characteristics: amplitude, dv/dt and duration. A custom-designed GaN-based discrete driver is implemented to achieve the desired switching speed and control over pulse duration. The modular design enhances flexibility and scalability. Experimental validation confirms the generator ability to produce nanosecond-long pulses with peak voltages up to 3.6 kV, demonstrating its potential to significantly advance electroporation research and technology.