Wrap a strip of paper or a piece of string around the bar and mark it for circumference. Then flatten it out, measure the circumference with a ruler and divide by 3.14 to get the diameter.
For many years, depending on options, the Ranger has had either 1.06" (1 1/16") or 1.14" (1 1/8") diameter sway bar. In metric, these correspond to roughly 27mm or 29mm. One of these will probably be very close to the diameter that you found by measuring.