I will give a survey on the modular invariance in conformal field theory. I will start with the modular invariance conjecture of Moore and Seiberg for rational conformal field theories. I will discuss Zhu's modular invariance result, the speaker's proof of the modular invariance conjecture of Moore and Seiberg, Miyamoto's pseudo traces and modular invariance result, and the speaker's recent proof of the modular invariance conjecture of twenty years for C_2-cofinite (logarithmic) conformal field theories.