The invention discloses a planar transformer which comprises a magnetic core and a coil winding; the magnetic core comprises a top plate, a bottom plate, a middle column and two edge columns, the middle column and the two edge columns are located between the top plate and the bottom plate, the coil winding and the magnetic core are assembled together, the top plate and the bottom plate are composed of a whole magnetic block or formed by laying and splicing a plurality of unit magnetic block bodies, and the middle column and the edge columns are formed by stacking multiple unit magnetic block bodies; each unit magnetic block body is a flat strip-shaped block body, and a preset gap is formed between the two ends of the two adjacent unit magnetic block bodies which are laid and spliced. The whole magnetic core is formed by piling multiple unit magnetic block bodies, the transformer can still maintain high efficiency under high frequency, the unit magnetic block body is the flat strip-shaped block body, it is convenient to produce the magnetic core, it is beneficial to miniaturization and planarizartion, and a piled production mode is more beneficial to automated generation; the preset gap is formed between the two ends of the two adjacent unit magnetic block bodies which are laid and spliced, magnetic resistance between every two unit magnetic block bodies is increased, an edge magnetic line can be drawn close to the magnetic core, and thus diffusion flux is reduced.