A Mach-Zehnder interferometer (MZI) based on a pair of long period gratings (LPGs) fabricated by silica microfiber for sensing applications is demonstrated. Each LPG with only 6 deformations was fabricated by using a pulsed CO2 laser to periodically modify the surface of the microfiber through only one scanning cycle. Owing to the relatively large effective refractive index (RI) difference between the fundamental and higher order modes of the microfiber LPG, the size of the microfiber MZI can reach as short as 8.84mm when the diameter of the microfiber is 9.5μm. The microfiber MZI can exhibit a high sensitivity of around 2225nm per refractive index unit and temperature sensitivity of only 11.7 pm/°C. Featured with the easy fabrication, excellent compactness, high sensitivity and stability, the microfiber MZI has potential in the microfiber-based devices and sensors.