The defending champion United States twice came from behind in extra innings to beat Japan 7-6 and win the softball world championship on Sunday night.