Have a Toys R Us gift card going unused? Bed Bath & Beyond will take it off your hands, offering store credit in return for a limited amount of time.

The retailer is accepting Toys R Us and Babies R Us gift cards with a balance of at least $20 through midnight Thursday, according to its website.

A shopper will receive a Bed Bath & Beyond e-gift card instantly, but the exchange value won't be exact. The retailer notes that prices can vary. Shoppers can check how much they will receive on the website before agreeing to a swap.

A Toys R Us card worth $100, for example, would be worth $64.20 in store credit at Bed Bath & Beyond.

While CNBC previously reported that shoppers have until April 21 to use their gift cards at Toys R Us and Babies R Us stores, they can no longer use them online. This past weekend, both ToysRUs.com and BabiesRUs.com were shut down by the company, which is in the process of liquidating all of its U.S. stores.