From the Super Mario Wiki
The redesigned Capsules in Super Smash Bros. for Wii U
Capsules are pink and white containers in all four games of the Super Smash Bros. series. They are light, and are easily carried and thrown by all the game's characters. A capsule contains one item. The size of the object doesn't seem to matter, as all sizes of objects, from baseball bats to hammers can be found within them. Alternatively, there is a 12.5% chance (1 in 8) that the capsule will explode when contact with the ground or another character is made, causing damage comparable to that of a Bob-omb.
In the Developer Direct video for Super Smash Bros. for Wii U, it was shown that the Capsules retained their original design from the previous Super Smash Bros. games. However, it was later shown in a Miiverse announcement by Masahiro Sakurai that they are now reduced in size.
Trophy Imformation from the Super Smash Bros. series
||These small containers contain items that fly out when the Capsules break. Capsules will explode roughly 12.5% of the time, so deciding where to break them can be quite a strategic decision; sometimes it's better to throw them rather than attacking them directly. Explosive Capsules pack a tremendous punch.
||A small item filled with...items. Break it open to get what's inside. However, there's a 12.5 percent chance that a capsule will contain explosives, so it's important to think about where you're throwing the capsule to break it open. You won't find crates or barrels in capsules, but you may find capsules within barrels and crates.