With the development of optical phased array (OPA) chips, it is urgent to design an optical system for detecting OPA chips. We propose a near-and far-field common optical path detection system adapted to commercial cameras. By changing the focal length of the rear set of lenses, the optical system can be used to realize the nearfield detection, far-field field of view (FOV) detection, and far-field resolution detection of OPA chips. The object spatial resolution of the near-field system is 1.11 μm, and the far-field system can achieve AE45 deg FOV detection and 0.0185 deg angular resolution. Simulation results show that it can be used to characterize the far-field spot with 0.1 deg resolution. The optical system is designed with spherical lenses, and its imaging performance approaches the diffraction limit.