The risk of leakage poses a grave threat to natural gas pipeline safety. The high compressibility of gases combined with unsteady boundary conditions makes detecting leaks in pipelines a challenging endeavor. To date, in the literature, only a limited number of studies have focused on leak detection and diagnostics in gas mixture pipelines. The present study provides a system for detecting, locating, and estimating the size of small gas leaks from a compressible and dynamic natural gas flow in pipelines with improved accuracy. As a case study, a long natural gas pipeline of 80 km is simulated with leak sizes of 0%, 2%, and 5%. The safety system is developed using mass flow rate, temperature, and pressure measurements. Six classes for faulty cases and one class for no fault case were considered for the study. A shallow neural network classifier (SNNC) is trained to identify a specific fault class. The SNNC is based on a two-layered network with 20 and 7 neurons. An input vector of 15 variables is provided to the system, and the output is one of the seven possible classes. Leakage as low as 2% at various locations are correctly diagnosed with more than 99% correct classification rate.