Diffraction and refraction of nonlinear shallow water waves due to uneven bathymetry are studied by use of the Green–Naghdi (GN) equations in three dimensions. A numerical wave tank consisting of deep, transitional, and shallow regions is created. Various forms of three-dimensional bathymetry, consisting of ramps with nonuniform profiles and large slopes, are used to connect the deep-water side of the tank to the shallow water shelf. A wavemaker is placed at the upwave side of the domain, capable of generating solitary and cnoidal waves of the GN equations. A numerical wave absorber is located downwave of the domain to minimize the wave reflection back into the domain. The system of equations is solved numerically in time domain by use of a second-order finite-difference approach for spatial discretization, and in a boundary-fitted coordinate system, and by use of the modified Euler method for time marching. Results include solitary and cnoidal wave surface elevation and particle velocities and are compared with the existing solutions where possible. Overall, very good agreement is observed. Discussion is provided on the nonlinearity and dispersion effects on the wave diffraction and refraction by the various forms of the ramps, as well as on the performance of the GN equations in solving these problems.