The assessment of the petroleum products quality often involves multiple indicators, among which water content and acid value are the two major parameters. The complexity of oil sample and narrow space in pipeline transport makes it difficult to monitor oil quality in real time. Considered the practical requirements, a new type of flexible microstrip sensor is proposed in this work. The shape and line width of the microstrip sensor are studied and optimized by theory and experiments. The proposed square spiral-based microstrip sensor has good water content detection resolution at high frequency with less acid interference and it can determine the acid value in low frequency band. The sensor surface is further passivated, protecting it from direct contact with the oil sample to enhance the electrochemical robustness, and still achieves good detection linearity and high sensitivity. After encapsulation on flexible substrate, the proposed microstrip sensor realized the non-contact determination of the water content and acid value of oil at the same time, which is only a few millimeters in size, and can conform to various tubing wall shapes. Due to the fact that the manufacture of the sensor is CMOS-compatible, we expect it to be readily applied to many other miniaturized chemical sensing applications.