Put butter in a small saucepan and melt over medium heat. Once melted, continue cooking, swirling saucepan often, until butter turns golden brown and smells nutty. Remove from heat.
In a small bowl, combine sugar and salt (if using).
Pour browned butter over sugar and stir until evenly coated and crumbly.
Spread mixture evenly on a piece of parchment paper or wax paper (or a plate). Let rest for about 30 minutes to dry, stirring once halfway through.