We propose and demonstrate an all-fiber liquid-level sensor using an in-line multimode-single-mode-multimode(MSM)fiber structure.A piece of single-mode fiber(SMF)is spliced to two sections of equivalent multimode fiber(MMF)which are used as both mode splitter and mode coupler.The cladding mode will be excited when the light propagates from MMF to SMF,and then it will be combined with fundamental mode to form a Mach-Zehnder interferometer(MZI)when the light propagates from SMF to the other MMF.The liquid level is detected by the selected resonant dips shift of the transmission spectrum.A sensing sensitivity of 264.6 pm/mm is achieved for the proposed sensor with an SMF length of 26 mm.Due to its compact structure,easy fabrication,and high sensitivity,the proposed liquid-level sensor is attractive for practical applications in a variety of fields,such as marine detection and chemical processing.