U.N. spokesman Stephane Dujarric said the U.N. is "very encouraged by this development" and is looking forward to confirmation of his actual release from detention.
Kartas has dual German-Tunisian nationality and his family said he was being investigated for "allegedly possessing and disclosing intelligence information concerning national security to foreign governments."
The United Nations has insisted that Kartas be freed because experts on U.N. missions have diplomatic immunity.
Dujarric told reporters "a Tunisian appeals court has reviewed the case against Mr. Kartas and has decided to release him."
He said the U.N. is seeking further information from the government, including on the status of legal proceedings against Kartas.
The German Foreign Ministry said later Tuesday that it was "very relieved" that Kartas had been released from jail.
In a statement, the Foreign Ministry said "the immunity of U.N. staff and experts is a great asset for the functioning of the multilateral order and must be respected by everyone."
German news agency dpa quoted Kartas' lawyers saying the case against their client continues and it is unclear whether he will be able to leave Tunisia.