As I have mentioned before, even when you strip away all the fun things Japan did in its occupied territories against civilians and also against prisoners of war, not to mention the bigger picture unprovoked military aggression against neighbouring states for no reason beyond conquest and expansion they had been waging for about 15 years by that point, the facts on the ground were as follows.
a) Japan was throwing everything into making any conventional military action to take them out as bloody and costly as humanly possible both to the allies and to their own people
b) Japan's "wishes for conditional surrender" so touted by their apologists unironically involved them keeping all the land and territories they violently conquered, them facing no punishment or consequence for their actions beyond promising to demilitarise and no war criminals receiving any trial, and the allies pulling out of asia entirely.
c) Japan had by that point already repeatedly used WMDs against its enemies in the form of biological weapons targeted at civilians with a death toll that exceeded what would come with the nukes, and were actively planning and preparing to target the US mainland with the same weapons either via their balloon delivery systems or via their new XXXL submarines that could carry small bombers and payloads
While point c) was unknown to the allies at the time, the fact of the matter was that from a big picture view in which all the nasty little details are obscured....yeah it was the right call. Morally and strategically and pragmatically and from any utilitarian total-suffering equation standpoint.
When you actually zoom in on the aforementioned nasty little details one wishes a couple more nukes had been thrown around just to even the score a little.