An anti-resonance pulse forming network (PFN) has been designed, analyzed, and tested for its application in generating quasi-square pulses. According to the circuit simulations, a compact generator based on two/three-section network was constructed. Two-section network is applied in the generator due to its compact structure, while three-section network is employed for generating pulses with higher quality. When two-section network is applied in the generator, the full-width at half-maximum of the load pulse is 400 ns, at the same time, its rise time, flat top and fall time are 90, 180 and 217 ns, respectively. When the three-section network is applied with the same pulse width of the load pulse, the rise time of the output decreases to 60 ns, while the flat top increases to 240 ns and the fall time reduces to 109 ns. Meanwhile, this kind of network could be used to shape the output pulses of generators whose equivalent circuit is LC series discharge network, such as MARX generator, into quasi-square pulses. And the preliminary experiment demonstrates that anti-resonance network could work well on four-stage Marx generators. A sine pulse generated by the four-stage Marx generator is shaped into a quasi-square pulse with voltage of 11.8 kV and pulse width about 110 ns based on two-section anti-resonance network.