There are plenty of synonyms for the phrase "under one's hat" that can be used interchangeably. Some similar expressions include keep something to oneself, keep something confidential, keep something secret or hidden, keep something quiet, keep something under wraps, keep something private, and keep something under lock and key. All of these phrases are used to convey the idea of keeping something hidden or secret from others. When someone says that they have something under their hat, it means that they are keeping a piece of information private and not revealing it to others.