A novel in-line fiber temperature sensor by splicing a piece of single mode fiber between two thermally expanded core fibers at their core-expanded ends is proposed and demonstrated. This structure forms an all fiber Mach–Zehnder interferometer due to the interference between the core mode and the cladding modes of the single mode fiber. The fabricated sensor is applied to measure temperature changes. The temperature sensitivity of the sensor at a length of 6.3cm is about 65.3 pm/°C. The proposed sensor is low cost, easily fabricated, and may be useful for detection of temperature.