The ocean plays an important role in modulating the mass balance of the polar ice sheets by interacting with the ice shelves in Antarctica and with the marine-terminating outlet glaciers in Greenland. Given that the flux of warm water onto the continental shelf and into the sub-ice cavities is steered by complex bathymetry, a detailed topography data set is an essential ingredient for models that address ice-ocean interaction.We followed the spirit of the global RTopo-1 data set and compiled consistent maps of global ocean bathymetry, upper and lower ice surface topographies, and global surface height on a spherical grid with now 30 arcsec grid spacing. For this new data set, called RTopo-2, we used the General Bathymetric Chart of the Oceans (GEBCO-2014) as the backbone and added the International Bathymetric Chart of the Arctic Ocean version 3 (IBCAOv3) and the International Bathymetric Chart of the Southern Ocean (IBCSO) version 1. While RTopo-1 primarily aimed at a good and consistent representation of the Antarctic ice sheet, ice shelves, and sub-ice cavities, RTopo-2 now also contains ice topographies of the Greenland ice sheet and outlet glaciers. In particular, we aimed at a good representation of the fjord and shelf bathymetry surrounding the Greenland continent. We modified data from earlier gridded products in the areas of Petermann Glacier, Hagen Bræ, and Sermilik Fjord, assuming that sub-ice and fjord bathymetries roughly follow plausible Last Glacial Maximum ice flow patterns. For the continental shelf off Northeast Greenland and the floating ice tongue of Nioghalvfjerdsfjorden Glacier at about 79° N, we incorporated a high-resolution digital bathymetry model considering original multibeam survey data for the region. Radar data for surface topographies of the floating ice tongues of Nioghalvfjerdsfjorden Glacier and Zachariæ Isstrøm have been obtained from the data centres of Technical University of Denmark (DTU), Operation Icebridge (NASA/NSF), and Alfred Wegener Institute (AWI). For the Antarctic ice sheet/ice shelves, RTopo-2 largely relies on the Bedmap-2 product but applies corrections for the geometry of Getz, Abbot, and Fimbul ice shelf cavities. The data set is available in full and in regional subsets in NetCDF format from the PANGAEA database at doi:10.1594/PANGAEA.856844.