You can format an SD card using Windows, Mac, and Android devices, and likely your digital camera too.
To format a hard drive before you start using it in Windows, use the Disk Management utility; on a Mac, use Disk Utility.