Topological materials have unique properties, such as dissipationless charge transport at their edges or surfaces. This and other interesting properties result from the topologically distinctive nature of the electron dynamics inside the material, characterized by a topological invariant. Switching this invariant on or off at will would be of great technological significance, but few materials exist where this can be achieved. One such material is ZrTe5, a layered van der Waals material, which lies at the edge of a topological transition. It is predicted that its topological invariant could be switched, using mechanical deformations by simply stretching or compressing the crystal lattice. During our scanning tunneling microscopy (STM) investigations we have discovered that bubbles in few layer ZrTe5 show a closing of the topological gap, a prerequisite to switching of the topological phase. This also enabled us to map the topological phase diagram of the material, as a function of mechanical deformation by ab initio calculations. Importantly, we could validate our calculations, by reproducing the complex surface charge density of the bubbles, measured by STM. Understanding the behavior of ZrTe5 under mechanical strain could lead to devices exploiting the switching of its topological properties.