There seems to be plenty of misconception about what would happen if your body was exposed to the conditions of space. Despite what Hollywood might have shown us it’s not exactly an immediate death.
Jim LeBlanc is one of the few humans to have ever experienced a vacuum. In 1965, he was testing pressurized suits for astronauts for NASA to simulate pressure conditions on the moon when his pressured valve became disconnected. He blacked out within seconds.
Luckily, he didn’t suffer any long-term damage. When he regained consciousness, he said the last thing he remembered was feeling the saliva on his tongue start to boil.
Another incident that involved three people occurred during the Soyuz-11 mission in 1971. During the crew’s descent back to Earth, 12 small explosives that were supposed to fire one at a time to detach the orbital module from the service module ended up firing all at once. When this happened, the pressure equalization valve, that’s function is to equalize the inside pressure of the capsule to the outside when atmospheric pressure reaches appropriate levels, opened and allowed air to escape from the module as they descended from orbit (beginning to lose pressure at 104 miles up).
The crew members instantly knew what had happened and Viktor Patsayev, being the only one close enough to do anything about it, attempted to close the valve manually. This takes 60 seconds to accomplish and it took 30 seconds for the cabin to completely depressurize (at about the 15 second mark the crew would have only had about 10-15 seconds of useful consciousness). Despite all this, Patsayev almost fixed the problem, managing to close the valve half way before passing out.
The three men were exposed to the near vacuum of space for approximately 11 minutes and 30 seconds. The capsule landed without the recovery crew aware that there was anything wrong. When they opened the hatch, they found all three cosmonauts appearing as if they were asleep. It wasn’t until they looked closer at them that they noticed some tissue damage, though not as severe, despite the extended time in a vacuum.
If you happen to find yourself in the vacuum of space with no pressurized suit, you should let all the air out of your lungs to prevent them from rupturing, and you might last 90 seconds without any permanent damage done. But after that, you will lose consciousness and eventually die from lack of oxygen.