A transformer isa device that transfers electric energy from one alternating-current circuit to one or more other circuits,
A transformer is used to step up or step down the voltage using the principle of electromagnetic induction.
The rectifier is the device that is used to convert AC to DC. Firstly it makes the AC signal unidirectional using the diode circuit and then using the filter circuit it makes the voltage constant.