Quantile factor models (QFM) represent a new class of factor models for high-dimensional panel data. Unlike approximate factor models (AFM), which only extract mean factors, QFM also allow unobserved factors to shift other relevant parts of the distributions of observables. We propose a quantile regression approach, labeled Quantile Factor Analysis (QFA), to consistently estimate all the quantile-dependent factors and loadings. Their asymptotic distributions are established using a kernel-smoothed version of the QFA estimators. Two consistent model selection criteria, based on information criteria and rank minimization, are developed to determine the number of factors at each quantile. QFA estimation remains valid even when the idiosyncratic errors exhibit heavy-tailed distributions. An empirical application illustrates the usefulness of QFA by highlighting the role of extra factors in the forecasts of US GDP growth and inflation rates using a large set of predictors.