In this paper, a new numerical approach is developed for solving linear and nonlinear Volterra–Fredholm integral equations. The fundamental structure of the presented method is based on the modification of hat functions.The properties of modification of hat functions (MHFs)are first presented. After implementation of our scheme, the solution of the main problem would be transformed into the solution of asystem of linear or nonlinear algebraic equations. Also, an error analysis is provided under several mild conditions. In addition, examples are presented to illustrate the pertinent features of the method and the results are discussed.