The equilibrium constants for ion pair formation of some pyridines have been evaluated by spectrophotometric titration with trifluoroacetic acid in different ionic liquids. The basicity order is the same in ionic liquids and in water. The substituent effect on the equilibrium constant has been discussed in terms of the Hammett equation. Pyridine basicity appears to be less sensitive to the substituent effect in ionic liquids than in water.