A line of sun hats designed for babies and toddlers has been recalled over concerns the cute accessories could pose a choking hazard.

Health Canada said the issue with the affected Joe Fresh Baby Girl and Baby Boy sun hats is the loop fastener, which "may detach and pose a choking hazard to children."

People who purchased the hats at Loblaws-owned stores across the country from January to June of this year are urged to stop using them immediately.

The hats were sold at Fortinos, Independent, Joe Fresh, Loblaws, Real Canadian Superstore, Shoppers Drug Mart, Zehrs, Dominion, Pharmaprix and other Loblaws-owned stores.

Health Canada said about 64,000 of the hats were sold across Canada over the last six months, but there have been no reports of injuries.

The hats, which come in dozens of different colours and styles, were manufactured in China by Huian Hengtong Gloves and Caps Co. in Jiangsu province, and by Style Headgear & Accessories Co., Ltd. in Zhangjiagang province.

They are identifiable by the following style codes on the product tag: BGS9C49019, BGS9C49012, BGS9C49013, BGS9C49016, BBS9C49016, BBS9C49017, BBS9C49019, BBS9C49022, BBS9C49025, BBS9C49026, BBS9C49027, BGS9C49028, BBS9C49028, BBS9C49001, BBS9C49002, BBS9C49005, BBS9C49006, BBS9C49007, BBS9C49011, BBS9C49012, BBS9C49013, BBS9C49018, BGS9C49001, BGS9C49002, BGS9C49003, BGS9C49005, BGS9C49006, BGS9C49007, BGS9C49008, BGS9C49010, BGS9C49011, BGS9C49017, BGS9C49018, BGS9C49020.

Customers can return the products to "any Loblaws banner store" for a full refund, Health Canada said.