The standard space-travel answer to that question puts the “edge of space” at 100 kilometers above Earth’s surface. That boundary is also called the “von Kármán line”, named after the Theodore von Kármán, the Hungarian scientist who figured it out.
Earth’s atmosphere looks very thin when compared to the rest of the planet. The green line is airglow high in the atmosphere, caused by cosmic rays striking the gases up there. This was shot by astronaut Terry Virts from the International Space Station. The legal definition of space is that it begins at the top of the atmosphere. NASA