Introduction: Idiopathic pulmonary fibrosis (IPF) is a chronic progressive pulmonary fibrotic disease with unknown etiology and poor outcomes. It severely affects the quality of life. In this study, we comprehensively analyzed the expression of N6-methyladenosine (m6A) RNA methylation regulators using gene expression data from various tissue sources in IPF patients and healthy volunteers.Methods: The gene expression matrix and clinical characteristics of IPF patients were retrieved from the Gene Expression Omnibus database. A random forest model was used to construct diagnosis signature m6A regulators. Regression analysis and correlation analysis were used to identify prognosis m6A regulators. Consensus cluster analysis was used to construct different m6A prognosis risk groups, then functional enrichment, immune infiltration and drug sensitivity analysis were performed.Result: Five candidate m6A genes from lung tissue were used to predict the incidence, and the incidence was validated using datasets from bronchoalveolar lavage fluid (BALF) and peripheral blood mononuclear cells. Subsequently, the BALF dataset containing outcomes data was used for the prognosis analysis of m6A regulators. METTL14, G3BP2, and ZC3H13 were independent protective factors. Using correlation analysis with lung function in the lung tissue-derived dataset, METTL14 was a protective factor in IPF. Based on METTL14 and G3BP2, a consensus cluster analysis was applied to distinguish the prognostic m6A regulation patterns. The low-risk group’s prognosis was significantly better than the high-risk group. Biological processes regulated by various risk groups included fibrogenesis and cell adhesion. Analysis of immune cell infiltration showed upregulation of neutrophils in the m6A high-risk group. Subsequently, five m6A high-risk group sensitive drugs and one m6A low-risk group sensitive drug were identified.Discussion: These findings suggest that m6A regulators are involved in the diagnosis and prognosis of IPF, and m6A patterns are a method to identify IPF outcomes.