The present invention relates to a linear generator including: a case having one end and the opposite end thereof fixed on a main oscillating body on which an electromotive force acts; a coil assembly which has one end connected to the case and the opposite end thereof and performs a straight reciprocating motion along the action direction of the electromotive force inside the case when the electromotive force acts on the main oscillating body; and a permanent magnet assembly which has one end connected to the coil assembly and the opposite end connected to the main oscillating body and performs the straight reciprocating motion out of phase with the coil assembly inside the coil assembly when the electromotive force acts on the main oscillating body.