We present a 1 × 4 Y-branch digital optical switch in which S-bend variable optical attenuators are integrated. The S-bend waveguides, which are always introduced to connect the switch and the standard fiber array, are made use of and designed as variable optical attenuators. A compact device with low crosstalk and larger branching-angle is obtained. The device is fabricated on the thermo-optic polymer materials,and the performance of the device is measured. With an applied driving power of less than 200mW, the device has a low crosstalk of less than - 35dB at a wavelength of 1.55 μm.