The alternative would have been Operation Downfall, a conventional invasion expected to cause up to 10M casualties and involve chemical weapons.
For scale, the atomic bombings killed ~200K Japanese while the Japanese occupation of China alone killed 20M
The savagery of the Imperial Japanese forces is well documented, as is their willingness to fight until death. It is difficult to imagine what the resistance involved in invading Japan would have been like.
The atomic bombings without doubt saved hundreds of thousands of lives on both sides. Further, since WWII, nuclear weapons have been a greater force for peace than anything in history. Let's hope that status quo continues...