An optical attenuator includes an optical fibre 12, the optical properties of which include at least one discontinuity 10 which interrupts the total internal reflection conditions of the optical fibre, so as to attenuate light transmitted through the optical fibre. The discontinuity 10 may be caused by variations in the refractive indices of a core layer and a clad layer of the optical fibre 12 e.g. gratings which may be formed at intervals of 500-600nm by a phase mask process. The gratings may be formed over a distance of 1-10cm. The attenuator may be for use at wavelengths around 1550nm. The optical fibre may be in a tube so as not to be influenced by external conditions.