A planar transformer comprises a primary coil board including a primary coil, a secondary coil board including a secondary coil, a heat sink integrally having a spacer portion, and a magnetic core assembly mounted to the primary coil board and the secondary coil board. The spacer portion is inserted into a gap between and facing the primary coil board and the secondary coil board and at least a surface of the heat sink is electrical insulating.