We examine the melting of sea ice versus freshwater ice in laboratory experiments and with one-dimensional model simulations. Our primary aim is to investigate the vertical partitioning of heat between thinning and internal phase changes. In agreement with our general understanding of the two ice types, we find that freshwater ice quickly starts thinning and then keeps a constant melt rate for constant external heat input. In contrast, sea ice starts thinning later but then thins faster than freshwater ice. This temporal evolution is caused by the substantial amount of heat that is used for internal phase changes in sea ice. Those internal phase changes give rise to a nonlinear temperature profile in the sea ice during the entire melting period, whereas freshwater ice quickly reaches its melting temperature throughout its entire thickness. Infrared imagery provides additional insights into the surface temperature of both ice types during melting. We find that, during melting, sea ice can have a mean surface temperature several tenths of a degree above 0°C because of meltwater-filled millimetre-scale dimples at the ice surface.