The spatial response functions in lateral and longitudinal directions of four cylindrical ionization chambers of the types NE 2561, FC65-G, PTW 31010, and PTW 31016, two plane-parallel ionization chambers of the types PTW 34001 and PTW 34045, and one diode of the type PTW 60012 were measured in air in high-energy photon beams with nominal accelerating voltages of 4 MV, 8 MV, and 25 MV, and electron beams with nominal energies of 6 MeV, 15 MeV, and 20 MeV. The measurements were performed by moving the detectors in small steps across the edge of a lead block for the photon beams, and across a thin slit between two lead blocks for the electron beams. Monte-Carlo calculations were used to analyze the measurements and to identify contributions of the different parts of the chamber. Finally, a simple empirical model for describing the spatial response functions is established.