A search for new resonances decaying into two hadronic jets is reported using the entire dataset of proton-proton collisions recorded at sqrt(s) = 13 TeV with the ATLAS detector at the Large Hadron Collider between 2015 and 2018, corresponding to an integrated luminosity of 139 fb−1. The dijet invariant mass distribution is compared to a smoothly-falling background prediction obtained by fitting the data. No significant excess is observed. Excited quarks with masses below 6.7 TeV are excluded at the 95% confidence level. Model-independent limits on Gaussian-shaped signals of various widths in dijet mass distribution are also set.