Hypoxia
Without atmospheric oxygen, the brain loses usable oxygen and consciousness fades in seconds. This is the first lethal clock.
Earth & Space
The answer is both better and worse than the movies suggest. Movies show exploding heads, instant freezing, boiling blood, and eyes popping out. Real vacuum exposure is less theatrical but still lethal. The strangest part is that you would likely remain conscious for about 9-15 seconds. Space exposure is a race between hypoxia, decompression, ebullism, radiation, and heat loss, and the first hazard is not the one most people expect.
Quick answer
Removing a helmet in space would cause loss of consciousness in roughly 9-15 seconds from hypoxia. You would not explode or freeze instantly. Exposed moisture would vaporize, gases would expand, and survival might be possible if repressurized within about 90 seconds. Soyuz 11 and a NASA vacuum-chamber accident provide the grim real-world evidence behind the survival window.

The short answer
Removing a helmet in space would cause loss of consciousness in roughly 9-15 seconds from hypoxia.
Hypoxia
Without atmospheric oxygen, the brain loses usable oxygen and consciousness fades in seconds.
Curiosity twist
Soyuz 11 and a NASA vacuum-chamber accident provide the grim real-world evidence behind the survival window.
Common mistake
The pressure difference would make the body explode.
Earth & Space
Not realistically. Without pressure, oxygenation cannot be maintained normally, and decompression, radiation, and tissue effects become limiting.
The real hazards of spacewalks
A spacesuit is a personal spacecraft: pressure, oxygen, temperature control, micrometeorite protection, and communication in one system.
Would you explode?
No. The body would swell, but skin and connective tissue can contain the pressure difference for a short time. Why people think this: The pressure difference is real, so rupture seems intuitive, but biological tissue is a stronger pressure vessel than people imagine.
Continue learning

Earth & Space
Another big-question explanation in the same collection.

Earth & Space
Another big-question explanation in the same collection.

Earth & Space
Another big-question explanation in the same collection.