pull one out of the hat

pull one out of the hat

To find sudden and unexpected success in a situation that seemed otherwise hopeless. An allusion to the classic magic trick of a magician pulling a rabbit out of a seemingly empty hat. Wow, I didn't think you'd have the programming ready in time for launch day, but you really pulled one out of the hat! I thought we were going to have a drab Christmas, considering how much my boyfriend and I have been working lately, but I came home on Christmas eve to find the whole house decorated and a lovely dinner on the table. I don't know how he did it, but he pulled one out of the hat this year!
See also: hat, of, one, out, pull

pull one out of the hat

bring off an unexpected trick in an apparently desperate situation.
The image here is of a rabbit pulled out of a magician's hat.
1971 James McClure The Steam Pig I must say you've really pulled one out of the hat this time.
See also: hat, of, one, out, pull