
<PAGE>

                                                           EXHIBIT 5.01

                       [Letterhead of Morrison & Foerster]


                                 April 16, 1998



IDT Corporation
190 Main Street
Hackensack, New Jersey  07601

         Re:   8 3/4% Senior Notes due 2006
               Registration Statement on Form S-4

Ladies and Gentlemen:

         We have acted as counsel for IDT Corporation, a Delaware corporation
(the "Company"), in connection with the Registration Statement (the
"Registration Statement") on Form S-4 under the Securities Act of 1933, as
amended, for the registration and issuance of an aggregate of $100,000,000
principal amount of 8 3/4% Senior Notes Due 2006 (the "New Notes") by the
Company, in connection with the exchange offer (the "Exchange Offer") of
$100,000,000 in previously issued 8 3/4% Senior Notes due 2006 (the "Old Notes")
for the New Notes. The Old Notes have been and the New Notes will be issued
pursuant to the terms and conditions of, and in the forms set forth in, an
indenture (the "Indenture"), dated February 18, 1998, among the Company and
First Trust National Association, as trustee (the "Trustee"), the form of which
is filed as an exhibit to the Registration Statement. The New Notes and the Old
Notes are referred to collectively hereinafter as the "Notes."

         We have examined originals or copies of the Indenture; the Old Notes 
and such corporate records, documents, instruments, certificates of public 
officials and of the Company and such questions of law as we have deemed 
necessary for the purpose of rendering the opinion set forth herein.

         In such examination, we have assumed the genuineness of all 
signatures and the authenticity of all items submitted to us as originals and 
the conformity with originals of all items submitted to us as copies. We have 
also assumed that the Trustee has the power and authority to execute and 
deliver, and to perform and observe the provisions of, the Indenture and the 
Notes, and the due authorization by the Trustee of all requisite action and 
the due execution and delivery of the Indenture and the Notes by the Trustee.

         The opinion expressed herein is subject to the following further
qualifications and exceptions:

         (i)  the effect of bankruptcy, insolvency, reorganization, 
arrangement, moratorium and or other similar laws relating to or affecting 
the rights of creditors generally, including, without limitation, laws 
relating to fraudulent transfers or conveyances, preferences and equitable 
subordination;

         (ii)  limitations imposed by general principles of equity upon the 
availability of equitable remedies or the enforcement of provisions of the 
Indenture and the New Notes; and the effect of judicial decisions which have 
held that certain provisions are unenforceable where their enforcement would 
violate the implied covenant of good faith and fair dealing, or would be 
commercially unreasonable, or where their breach is not material;

         (iii) our opinion is based upon current statutes, rules, regulations, 
cases and official interpretive opinions, and it covers certain items that 
are not directly or definitively addressed by such authorities; and

         (iv)  we express no opinion as to the effect on the opinion expressed 
herein of (a) the compliance or non-compliance of the Trustee with any laws 
or regulations applicable to it, or (b) the legal or regulatory status or the 
nature of the business of the Trustee.

         Based upon and subject to the foregoing, we are of the opinion that 
upon (i) the execution and delivery by the Company of the New Notes in 
accordance with the terms of the Indenture and (ii) the valid tender of the 
Old Notes to the Trustee, as exchange agent for the Exchange Offer, in the 
manner contemplated by the Registration Statement, the New Notes will 
constitute the legal, valid and binding obligations of the Company, entitled 
to the benefits of the Indenture, and enforceable against the Company in 
accordance with their terms.

         We express no opinion as to matters governed by laws of any 
jurisdiction other than the laws of the State of New York (without reference 
to its choice-of-law rules), the General Corporation Law of the State of 
Delaware and the federal laws of the United States of America, as in effect 
on the date hereof.

         We hereby consent to the use of this opinion in connection with the 
Registration Statement and to the reference to our firm set forth therein 
under the caption "Legal Matters."

                                                    Yours very truly,


                                                    /s/ Morrison & Foerster LLP
