H2testw is a program developed by Harald Boegeholz that can test your storage devices for their actual size, as opposed to what is advertised. The development of this tool was a response to the proliferation of counterfeit SD cards and USB sticks that did not match the advertised size.
The program is incredibly easy to use, and it can be downloaded and installed on your computer free of charge. Once you have installed H2testw, all you have to do is plug in your storage device and select it from the program’s interface. Then, you can start the testing process, which will scan your device for its actual size and check for any bad sectors.