Gather all ingredients. Preheat the oven to 350 degrees F (175 degrees C).
Mix hash browns, Cheddar cheese, condensed soup, sour cream, ½ of the melted butter, onion, salt, and pepper in a bowl. Transfer mixture to a 9x13-inch baking dish.
Sprinkle cornflakes on top, then drizzle with remaining melted butter.
Bake in the preheated oven until sauce is bubbly and top is golden brown, 1 to 1 ½ hours.
Serve and enjoy!
