Yes, you can freeze butter – in fact, unsalted butter can last up to five months; salted butter up to nine with proper storage.
To keep it tasting as fresh as possible, keep it in its original wrapping. You can also wrap it in foil or plastic and put it in an air-tight container. This will make sure the butter doesn’t absorb other flavors. You can freeze it in blocks, sticks or slice it into pats of butter.
Keep the butter frozen until you’re ready to use it, then let it thaw in the refrigerator. Or, depending on how you plan to use it, consider grating the butter while it’s still frozen – it softens quickly and works well for baked goods. While freezing suspends the spoilage process, it’s recommended that thawed butter be used as quickly as possible.
Source: https://www.usdairy.com/news-articles/can-you-freeze-butter