Increased tissue stiffness is a classic characteristic of solid tumors. One of the major contributing factors is increased density of collagen fibers in the extracellular matrix (ECM). Here, we investigate how cancer cells biomechanically interact with and respond to the stiffness of the ECM. Probing the adaptability of cancer cells to altered ECM stiffness using optical tweezers-based microrheology and deformability cytometry, we find that only malignant cancer cells have the ability to adjust to collagen matrices of different densities. Employing microrheology on the biologically relevant spheroid invasion assay, we can furthermore demonstrate that, even within a cluster of cells of similar origin, there are differences in the intracellular biomechanical properties dependent on the cells' invasive behavior. We reveal a consistent increase of viscosity in cancer cells leading the invasion into the collagen matrices in comparison with cancer cells following in the stalk or remaining in the center of the spheroid. We hypothesize that this differential viscoelasticity might facilitate spheroid tip invasion through a dense matrix. These findings highlight the importance of the biomechanical interplay between cells and their microenvironment for tumor progression.