Valdimarsson, 24, arrived from Swedish club IF Elfsborg in January 2024 after keeping 14 clean sheets in his final season there, and has made 12 appearances for Brentford across all competitions.
Head coach Keith Andrews praised the Iceland international's contribution beyond match days.
"People maybe don't recognise what goes on behind the scenes, and the importance of some of the players who are part of this journey. Hákon is a big part of the fabric of this football club, and he understands it.
"He's a very liked individual, he's got some very close connections within the club, he's an outstanding goalkeeper — we've seen that when he's played this season — and we're really happy that he's signed a new deal."
Valdimarsson has played a key cup role this season, featuring in every Carabao Cup tie and saving two penalties in a shootout victory over Aston Villa in the third round.
He made his Premier League debut in December 2024 as an injury replacement for Mark Flekken against Brighton, keeping a clean sheet.
His path to professional football was unconventional. He began as an outfield player at the KR Reykjavík academy before switching to goalkeeping at the age of 15. He led Grotta to back-to-back promotions into the Icelandic top flight before his move to Elfsborg, where he won Swedish Goalkeeper of the Year in his second season.
