keep under one's hat
Preserve the secrecy of something, as in I'll tell you about it if you promise to keep it under your hat. This usage alludes to hiding a secret in one's head, covered by a hat. [Late 1800s]
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.