An X-ray generator is a device used to generate X-rays.It is commonly used by radiographers to acquire an x-ray image of the inside of an object (as in medicine or non-destructive testing) but they are also used in sterilization or fluorescence.

The heart of an X-ray generator is the X-ray tube.Like any vacuum tube,the X-ray tube contains a cathode,which directs a stream of electrons into a vacuum,and an anode,which collects the electrons and is made of copper to evacuate the heat generated by the collision.When the electrons collide with the target,about 1% of the resulting energy is emitted as X-rays,with the remaining 99% released as heat.Due to the high energy of the electrons that reach relativistic speeds the target is usually made of tungsten even if other material can be used particularly in XRF applications.

A cooling system is necessary to cool the anode; many X-ray generators use water or oil recirculating systems.

The discovery of X-rays came from experimenting with Crookes tubes,an early experimental electrical discharge tube invented by English physicist William Crookes around 1869-1875.In 1895,Wilhelm R?ntgen discovered X-rays emanating from Crookes tubes and the many uses for X-rays were immediately apparent.One of the first X-ray photographs was made of the hand of R?ntgen's wife.The image displayed both her wedding ring and bones.On January 18,1896 an X-ray machine was formally displayed by H.L.Smith.

In the 1940s and 1950s,X-ray machines were used in stores to help sell footwear.These were known as Shoe-fitting fluoroscopes.However,as the harmful effects of X-ray radiation were properly considered,they finally fell out of use.Shoe-fitting use of the device was first banned by the state of Pennsylvania in 1957.(They were more a clever marketing tool to attract customers,rather than a fitting aid.)