A distributed optical fiber sensor for salinity sensing is proposed and analyzed. The sensor uses a single mode fiber coated with polyimide and is based on optical frequency domain reflectometry. By applying the polyimide solution to the surface of the fiber, a layer of polyimide film is formed by heating. As the polyimide coating is very sensitive to changes in the salinity of the external solution, the polyimide film will expand or shrink as the external concentration changes. This converts the value of salt concentration into the frequency shift in the spectrum through cross-correlation. To characterize the sensor, four polyimide-coated sensors with different average coating thicknesses of 126 µm, 170 µm, 192 µm and 249 µm were fabricated. The sensitivities of -21.71 GHz/(mol/L), -28.55 GHz/(mol/L), -29.97 GHz/(mol/L) and -42.78 GHz/(mol/L) were achieved when the salinity was measured from 0 mol/L to 3.09 mol/L, respectively. The sensitivity and response time of polyimide fibers with different diameters were measured. The minimum salinity measurement uncertainty of the sensor is 0.05 mol/L. The sensor has high sensitivity and has promising applications in observing ocean parameters and ion chemical sensing.