In general your passport has to be valid minimum 6 month beyond the length of the trip when traveling in Jordan. The cost of a single entry visa is 20 JD per person (around 30 USD), it is valid for 28 days. Travelers arriving and departing Aqaba, either through the port, the airport or at the crossing from Israel or Saudi Arabia, are granted a free visa to Jordan. Most nationalities can obtain the Jordanian visa at the airport or the land borders, except the Allenby Bridge/King Hussein Bridge. The visa has to be paid in cash in Jordanian Dinar, money exchange facilities are existent. Some nationalities need the visa prior to arrival, see the below list. This list is meant solely as a useful tool and the data within it is subject to change without prior notice. It is recommended that you check with the Jordanian diplomatic mission in your country prior to travel.
UPDATE: Started and effective on 1st of April 2014, visa fee for entering Jordan is now 40 JOD per person ( around 60 USD). This applies to all individuals arriving at Queen Alia Airport or any ground border (except Allenby). In Aqaba and Arava non-restricted nationalities still obtain free visa on arrival.
Nationals from below countries are able to obtain the Jordanian visa upon arrival, except at Allenby Bridge:
Algeria, Andorra, Antigua and Barbuda, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Barbados, Belgium, Bhutan, Bolivia, Bosnia & Herzegovina, Brazil, Brunei, Bulgaria, Burma, Canada, Cape Verde, Chile, China, China (Taiwan), Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Dominica, Dominican Republic, Ecuador, Egypt, Estonia, Federated States of Micronesia, Fiji, Finland, France, Georgia, Germany, Greece, Grenada, Guatemala, Guyana, Haiti, Holland, Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Ireland, Israel, Italy, Jamaica, Japan, Kazakhstan, Kiribati, Kuwait, Kyrgyzstan, Latvia, Lebanon, Lesotho, Libya, Liechtenstein, Lithuania, Luxembourg, Macau, Macedonia, Malawi, Malaysia, Maldives, Malta, Marshall Islands, Mauritius, Mexico, Monaco, Montenegro, New Zealand, Nicaragua, North Korea, Norway, Oman, Palestine/PNA Passport Holders, Panama, Paraguay, Peru, Poland, Portugal, Qatar, Romania, Russia, Saint Kitts and Nevis, Saint Lucia, Saint Vincent, Salvador, Samoa, San Marino, São Tomé and Príncipe, Saudi Arabia, Seychelles, Singapore, Slovakia, Slovenia, Solomon Islands, South Korea, South Africa, Spain, Surinam, Sweden, Syria, Swaziland, Switzerland, Tajikistan, Thailand, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Tuvalu, United Arab Emirates, Ukraine, United Kingdom & North Ireland, United States of America, Uruguay, Uzbekistan, Vanuatu, Vatican City, Venezuela, White Russia, Yemen, Zimbabwe.
Nationals from below countries need the Jordanian visa prior to arrival:
Afghanistan, Albania, Angola, Bangladesh, Belize, Benin, Botswana, Burkina Faso, Burundi, Cambodia, Cameron, Central African Republic, Chad, Colombia, Comoros, Congo, Ivory Coast, Cuba, Djibouti, Equatorial Guinea, Eritrea, Ethiopia, Gabon, Gambia, Ghana, Republic of Guinea, Guinea-Bissau, Iran, Iraq, Kenya, Laos, Liberia, Madagascar, Mali, Mauritania, Moldavia, Mongolia, Morocco, Mozambique, Myanmar, Namibia, Nepal, Niger, Nigeria, Pakistan, Papua New Guinea, Philippines, Rwanda, Senegal, Sierra Leone, Somalia, Sri Lanka, Sudan, Tanzania, Togo, Uganda, Vietnam, Zaire, Zambia.