This paper presents the method of magnetic-flux-leakage (MFL) detection and the characteristics of a giant-magnetoresistance (GMR) sensor. An experimental apparatus that uses a GMR sensor for oil-pipeline inspection is described. A permanent-magnet assembly was used to excite MFL signals. The signal from the GMR sensor is preamplified with an appropriate gain. The result shows the magnetic-flux-leakage method based on a GMR sensor can detect small defects in an oil pipeline. 1 Over the years, many different nondestructive testing techniques have been investigated for evaluating the condition of oil pipelines. The magnetic-flux-leakage (MFL) technique is generally considered the modest cost-effective method for corrosion monitoring. In order to ensure that the product is safely and efficiently transported, the pipelines are periodically inspected for damage caused by corrosion and other factors using a device called an intelligent pig. The pig, in brief, is a magnetizer assembly, which employs the magnetic-flux-leakage technique for assessing the condition of a pipe [1]. A pig travels in a pipeline with the flow of the product transported through the pipeline. A strong permanent magnet (often NdFeB, for its high field strength) in the pig nearly saturates the pipe wall with a magnetic flux flowing in the axial direction. Any metal damage in the pipe wall that causes significant geometric distortion acts as an area of increased magnetic reluctance and causes local perturbation of the magnetic-field distribution. As a result, the level of leakage-flux density increases locally near a defect, both inside and outside the pipe. Magneticfield sensors are usually installed around the circumference of the pig between the two poles of the magnetizer to measure the leakage flux.In the domain of magnetic-field sensors, ferromagnetic-thin-film magnetoresistance (MR) sensors and Hall effect magnetic sensors have by far the highest industrial importance. Hall sensors have much lower sensitivities. A Hall sensor system may require a large electronic gain, which limits the achievable bandwidth of the sensor system. On the other hand, Hall sensors show no saturation effects at high magnetic fields. Additionally, in most cases, the measured magnetic field must be perpendicular to the sensor chip [2]. The MR sensors used most often are anisotropic magnetoresistance (AMR) sensors. AMR magnetic sensors have high resolution and high bandwidth, but they become saturated in a rather small magnetic field and may require a complex resetting procedure. Owing to the emergence of nanotechnology, thin layers down to the nanometer range have been achieved, which has lead to the discovery of a new class of MR effects. This new MR effect has been called "giant" owing to its enormous value in comparison to the AMR effect [3]. Giant-magnetoresistance (GMR) sensors have high sensitivity and signal dynamics and negligible temperature and frequency dependences. GMR sensors have been used in an MFL inspection system [4,5].This paper presents an oil-pip...