Keep Something Under Your Hat

to keep a secret

Examples:

  • I have a secret. Promise to keep it under your hat.
  • Paul kept the company secret under his hat.