Of course, x-rays are a phenomenon of the natural world, and thus can't be invented. But they were discovered accidentally.
The invisible was made visible in 1895. X-ray is undoubtedly one of the epoch-making advancement in the field of medicine.
All credits to physicist Wilhelm Conrad Rontgen. While testing whether cathode rays could pass through glass, he noticed a glow coming from a nearby chemically coated screen. Because of their unknown nature, he named it as X-rays. Through his observation, he learned that X-rays can be photographed when they penetrate into human flesh.
In 1897, during the Balkan war, X-rays were first used to find bullets and broken bones inside patients. In 1901, he received the Nobel prize in physics for his work.