If you hold F-1 status you are eligible to change status in the U.S. to any other immigration status for which you qualify. Students in F-1 status are considered to be in status for 60 days after completion of a program or study or Optional Practical Training, and may apply for a change of status during the 60 day grace period.
If your status is J-1 your eligibility to change to another nonimmigrant status may be limited. If you did not come to the United States to receive graduate medical education or training, are not subject to the J-1 two-year home country residence requirement, or have had that requirement waived, you may apply for a change to any other nonimmigrant status for which you are qualified. If you are subject to the J-1 two-year home country physical presence requirement, you are eligible to change only to A (diplomatic or government official) or G (international organization) status, provided that you are accredited by the foreign government or international organization to the Department of State.
An alien outside the United States who previously had been in the United States as an exchange visitor may apply for a different non-immigrant visa at a U.S. Embassy or Consulate. Authority to grant such a visa lies within the discretionary power of the consular officer. No minimum time abroad is required to obtain a different visa unless you are subject to the two-year home country physical presence requirement, in which case you must satisfy that requirement or have it waived before being eligible for an immigrant H or L visa. Returning to the United States in another status does not absolve you from a previously incurred two-year home country physical presence requirement.
Persons in J-1 or J-2 status are considered to be in-status for 30 days after completion of program or after completion of academic training, and may apply for a change of status during the 30 day grace period.