Michael O'Neill's side recorded wins over New Zealand and Azerbaijan in June to move up six places to 22nd.
Germany, who beat Chile to win the Confederations Cup on Sunday, moved above Brazil and Argentina to go top for the first time in two years.
England are 13th, Wales dropped from 13th to 20th and Scotland are 58th.
Northern Ireland have not lost or conceded a goal in three matches and are second in their World Cup qualifying group, behind world champions Germany.
Both Joachim Low's side and Brazil, in second, are comfortably clear of third-placed Argentina at the top of the rankings, with Portugal and Switzerland completing the top five.
Northern Ireland reached their highest position in Fifa's official rankings as Confederations Cup winners Germany returned to first place.