Both coronavirus disease 2019 (COVID-19) and idiopathic pulmonary fibrosis (IPF) could cause severe pulmonary injury and have extremely dismal prognoses with a high risk of mortality. Resveratrol (RSV), a natural polyphenol, has promising potential in the treatment of viral infection and pulmonary fibrosis. The purpose of this research was to investigate the unclear mechanism of RSV as an anti-COVID-19 and IPF therapy. Utilizing relevant databases, the intersection of genes related to IPF, COVID-19, and possible RSV targets was discovered. Then the obtained targets were investigated using GO and KEGG analysis, TP and PPI network analysis. Furthermore, the binding affinities between core targets and RSV were calculated using molecular docking. The 1101 COVID-19 targets, 2166 IPF targets, and 341 RSV targets intersected with 21 overlapping targets. PPI network reveals the interactions among targets and TP network reveals interactions between targets and pathways. Five targets including JUN, CCL2, CXCL8, IL6, and SERPINE1 were identified as the core targets through two network analyses. GO analysis demonstrated chemotaxis, inflammatory response and angiogenesis were the significant pathophysiological processes. Combing TP network analysis and KEGG analysis, IL-17 signaling pathway was considered as the significant pathway. Except for JUN, molecular docking showed the binding energies of other four targets were lower than -5 kcal/mol indicating intimate interactions between RSV and other targets. Our research elucidate the targets, pathways and pathophysiological processes of RSV involved in effects of anti-COVID-19 and IPF, suggesting RSV could be a therapeutic candidate for reducing infection and fibrosis.