Questioning basic assumptions about the structure of space and time has greatly enhanced our understanding of nature. State-of-the-art atomic clocks(1-3) make it possible to precisely test fundamental symmetry properties of spacetime and search for physics beyond the standard model at low energies of just a few electronvolts(4). Modern tests of Einstein s theory of relativity try to measure so-far-undetected violations of Lorentz symmetry(5); accurately comparing the frequencies of optical clocks is a promising route to further improving such tests(6). Here we experimentally demonstrate agreement between two single-ion optical clocks at the 10(-18) level, directly validating their uncertainty budgets, over a six-month comparison period. The ytterbium ions of the two clocks are confined in separate ion traps with quantization axes aligned along non-parallel directions. Hypothetical Lorentz symmetry violations(5-7) would lead to periodic modulations of the frequency offset as the Earth rotates and orbits the Sun. From the absence of such modulations at the 10(-19) level we deduce stringent limits of the order of 10(-21) on Lorentz symmetry violation parameters for electrons, improving previous limits(8-10) by two orders of magnitude. Such levels of precision will be essential for low-energy tests of future quantum gravity theories describing dynamics at the Planck scale(4), which are expected to predict the magnitude of residual symmetry violations.