How long does sugar last?
Unopened, it keeps in the cupboard for about 2 years.
This refers to: White granulated sugar.

Shelf life of sugar at a glance
| Storage | Unopened | Opened |
|---|---|---|
| Cupboard | 2 years | – |
EU law does not require a best-before date on sugar, and kept dry it practically never spoils. Store it airtight so it does not clump or absorb odours.
Past its date does not mean spoiled
These are guide values for food stored correctly. A best-before date is not a throw-away date: many products are still fine after it. Check how it looks, smells and tastes. Mould, an unusual smell or a bulging can are reasons to throw it away. A use-by date is different: do not eat the food after it.