We compute the Picard group of the moduli stack of elliptic curves and its canonical compactification over general base schemes.