Amazon wants its third-party sellers to make better use of their unsold or unwanted products that often get dumped — by giving them away to charity.

Amazon is launching a new donations program, called Fulfillment by Amazon (FBA) Donations, for third-party sellers that store their inventory in Amazon's warehouses in the U.S. and UK, CNBC has learned. Starting on September 1, the donation program will become the default option for all sellers when they choose to dispose of their unsold or unwanted products stored in Amazon warehouses across those two countries. Sellers can opt out of the program, if they want.

The donations will be distributed to a network of U.S. nonprofits through a group called Good360 and UK charities such as Newlife and Barnardo's. After this story was published, Amazon announced the program via a blog post on Wednesday afternoon.

The new donations program is designed to reduce the amount of inventory that must be dumped from Amazon's warehouses, helping the environment and putting otherwise wasted products to some use. Recent reports found that Amazon routinely discards unsold inventory, with one French TV documentary by M6 estimating Amazon to have destroyed over 3 million products in France last year. Given that Amazon generates the bulk of its sales in the U.S., the number of destroyed inventory in its U.S. warehouses is likely much larger than those found in other countries.