Prepare the pan: Line an 8×8-inch square baking pan with parchment paper, leaving some overhang on the sides for easy removal. Lightly grease the parchment with butter or nonstick spray to prevent sticking.
Melt the base: In a medium saucepan over low heat, combine white chocolate chips, sweetened condensed milk, and butter. Stir constantly with a heat-resistant spatula to ensure the chocolate melts evenly and the mixture becomes smooth and glossy. Be careful not to overheat, as white chocolate can scorch easily.
Add flavor: Once melted and smooth, remove from heat and stir in vanilla extract, almond extract (if using), and a pinch of salt. Taste slightly to adjust the sweetness or flavor balance if desired.
Mix in sprinkles: Gently fold in 1/2 cup of rainbow sprinkles, saving some to sprinkle on top later. This will give your fudge a festive, birthday cake look inside.
Pour and smooth: Transfer the fudge mixture into the prepared pan, spreading it evenly with a spatula. Sprinkle the remaining rainbow sprinkles on top, pressing lightly so they stick but don’t sink into the fudge.
Chill: Refrigerate for at least 2–3 hours, or until completely set and firm to the touch. For quicker setting, you can place it in the freezer for about 1 hour, but monitor to prevent freezing.
Slice and serve: Use the parchment overhang to lift the fudge out of the pan. Place on a cutting board and slice into 16 even squares using a sharp knife. Wipe the knife clean between cuts for smooth edges. Serve immediately or store in an airtight container in the refrigerator for up to one week.