The National Security Agency revealed to federal agencies the identities of almost 17,000 U.S. residents or corporations whose information was collected under a foreign surveillance law in 2018, registering about a 75% increase in unmaskings over the previous year, according to an annual transparency report released Tuesday.

The NSA, responsible for electronic eavesdropping, disclosed the identities of people or entities that are normally redacted in intelligence reports—in response to specific requests from other government...