We report the design and characterization of a high performance integrated arbitrary filter from 1450 nm to 1640 nm. The filter's target spectrum is chosen to suppress the night-sky OH emission lines, which is critical for ground-based astronomical telescopes. This type of filter is featured by its large spectral range, high rejection ratio and narrow notch width. Traditionally it is only successfully accomplished with fiber Bragg gratings. The technique we demonstrate here is proven to be very efficient for on-chip platforms, which can bring many benefits for device footprint, performance and cost. For the design part, two inverse scattering algorithms are compared, the frequency domain discrete layer-peeling (f-DLP) and the time domain discrete layer-peeling (t-DLP). f-DLP is found to be superior for the grating reconstruction in terms of accuracy and robustness. A method is proposed to resolve the non-uniformity issue caused by the non-zero layer size in the DLP algorithm. The designed 55-notch filter is 50-mm-long and implemented on a compact Si 3 N 4 /SiO 2 spiral waveguide with a total length of 63 mm. Experimentally, we demonstrate that the device has a insertion loss as low as 2.5 dB, and that the waveguide propagation loss is as low as 0.10 dB/cm. We are also able to achieve uniform notch depths and 3-dB widths of about 28 dB and 0.22 nm, respectively. a denotes the widths of narrow -wide part of a simple Bragg grating. sign for the R&D of large-scale photonic circuits with increasing flexibility and complexity.