Provided are iminosugars having antibacterial properties and methods of treating and/or preventing bacterial infections with such iminosugars. The present disclosure relates to antibacterial compounds and, in particular, to iminosugars having antibacterial activity. One embodiment is a method of treating or preventing a bacterial infection comprising administering to a subject in need thereof an antibacterial effective amount of a compound of the following formula: or a pharmaceutically acceptable salt thereof.