Sensors are devices or systems able to detect, measure and convert magnitudes from any domain to an electrical one. Using light as a probe for optical sensing is one of the most efficient approaches for this purpose. The history of optical sensing using some methods based on absorbance, emissive and florescence properties date back to the 16th century. The field of optical sensors evolved during the following centuries, but it did not achieve maturity until the demonstration of the first laser in 1960. The unique properties of laser light become particularly important in the case of laser-based sensors, whose operation is entirely based upon the direct detection of laser light itself, without relying on any additional mediating device. However, compared with freely propagating light beams, artificially engineered optical fields are in increasing demand for probing samples with very small sizes and/or weak light–matter interaction. Optical fiber sensors constitute a subarea of optical sensors in which fiber technologies are employed. Different types of specialty and photonic crystal fibers provide improved performance and novel sensing concepts. Actually, structurization with wavelength or subwavelength feature size appears as the most efficient way to enhance sensor sensitivity and its detection limit. This leads to the area of micro- and nano-engineered optical sensors. It is expected that the combination of better fabrication techniques and new physical effects may open new and fascinating opportunities in this area. This roadmap on optical sensors addresses different technologies and application areas of the field. Fourteen contributions authored by experts from both industry and academia provide insights into the current state-of-the-art and the challenges faced by researchers currently. Two sections of this paper provide an overview of laser-based and frequency comb-based sensors. Three sections address the area of optical fiber sensors, encompassing both conventional, specialty and photonic crystal fibers. Several other sections are dedicated to micro- and nano-engineered sensors, including whispering-gallery mode and plasmonic sensors. The uses of optical sensors in chemical, biological and biomedical areas are described in other sections. Different approaches required to satisfy applications at visible, infrared and THz spectral regions are also discussed. Advances in science and technology required to meet challenges faced in each of these areas are addressed, together with suggestions on how the field could evolve in the near future.