It may not be a question you’ve ever asked yourself, but it’s certainly germane to any number of science fiction writers. Turns out you’ve got about 10 seconds of consciousness, and if air pressure and oxygen are restored within a minute and a half, you can be revived without serious consequences.
Beyond that, what with the blood boiling and the heart stopping, etc., you’re out of luck.
I have a vague memory of Arthur C. Clarke working against the stereotype of humans somehow exploding if exposed to a vacuum by having characters leap unprotected from one vessel to another. Not a clue what book or short story it would have been in, though. (Not even sure it was Clarke, but it sounds like something he’d come up with.) I seem to remember him giving them more than 10 seconds of consciousness, though.