The Internal Revenue Service has kicked off a new program under which it shares large amounts of individuals’ financial-account information with certain foreign countries, the agency said Friday.

The IRS said it received digital information about U.S. taxpayers’ foreign accounts from governments and firms around the world, and it sent information on foreigners’ U.S. accounts to government authorities in as many as 34 countries. While governments have exchanged such information in the past, the sharing wasn’t automatic and...