Contrary to popular belief, not all electrical outlets are the same in every country. Electricity in the U.S. runs on 120volts and has two- or three- prong outlets, while electricity in Japan runs on 100 volts and have two-prong outlets. Although the two-prong outlets look similar to the North American two-prong outlets, they are not the same voltage. Plugging your North American electrical equipment into a Japanese outlet is not wise and could damage your electronics. Therefore, you should buy a converter or transformer.
Converter v. Transformer
When using North American electronics in Japan, you need a transformer or converter to convert the voltage. A converter is usually more lightweight and ideal for low power electronics not to be used for a long amount of time, like hairdryers and irons. A transformer can be used for a continuous amount of time and is more ideal for things like battery chargers, computers, cameras, etc. Some places do sell a converter/transformer combo that has a switch allowing you to switch between the two.