The 1987 San Francisco 49ers season was the franchise's 38th season in the National Football League and their 42nd overall. The 49ers won the division for the second consecutive season, and ended the season as the top seed in the NFC playoffs. The season ended with an upset loss to the Minnesota Vikings in the divisional round of the playoffs.