A generally applicable procedure is given for shaping of 1 × 2 digital optical switches in order to reduce the cross-talk (CT) or, equivalently, the required device length. The method is based on coupled mode theory and assumes that the two coupled mode equations may be decoupled in good approximation. Doing so it follows that the cross talk may be expressed in terms of a Fourier component of a function, which depends on the shape of the device. Based on this a procedure for optimising the Y-junction may be formulated. Calculations, using the beam propagation method and coupled mode theory, on a thus obtained structure are presented and show that a length reduction by a factor of ∼2 can be obtained at a CT level of −38 dB.