The 21-year-old joined the Millers on loan in January and has made two appearances so far.
Bray never played a first-team game for the Swans but did appear five times for the club's under-21 side in the EFL Trophy this season.
Rotherham are bottom of the Championship, 19 points adrift of safety.
Find all the latest football transfers on our dedicated page.
Rotherham United have signed Swansea winger Alex Bray for an undisclosed fee until the end of the 2018-19 season.