1. A code reader which is adapted to be used with a sheet-like recording medium on which data are recorded as an optically readable code pattern and to optically read the code pattern while being manually moved over the code pattern in contact with the recording medium, comprising: an optical system for forming an optical image of the code pattern recorded on the recording medium onto a photosensor; and said photosensor for converting the optical image formed by said optical system into an electrical signal, wherein a modulation transfer function (MTF) best position on a subject-side of said optical system at a spatial frequency corresponding to the code pattern is set to be present at a given distance from that surface of the code reader which is brought into contact with the recording medium.