1
                                                                EXHIBIT 5

                        [LATHAM & WATKINS LETTERHEAD]




                              December 23, 1996




IDEX Corporation
630 Dundee Road, Suite 400
Northbrook, Illinois 60062

        Re:  Registration Statement on Form S-8 for 1996 Stock Plan for
             Officers of IDEX Corporation, 1996 Stock Option Plan for
             Non-Officer Key Employees of IDEX Corporation, Amended and
             Restated IDEX Corporation Directors Deferred Compensation Plan,
             IDEX Corporation Deferred Compensation Plan for Non-Officer
             Presidents and IDEX Corporation Deferred Compensation Plan for
             Officers
        
Ladies and Gentlemen:

        We have acted as your special counsel in connection with the
above-captioned Registration Statement (the "Registration Statement") with
respect to the offer and sale of up to 1,400,000 shares of Common Stock of IDEX
Corporation, par value $.01 per share (the "Stock") and $24,903,125 in deferred
compensation obligations ("Obligations"), pursuant to the 1996 Stock Plan for
Officers of IDEX Corporation, 1996 Stock Option Plan for Non-Officer Key
Employees of IDEX Corporation, Amended and Restated IDEX Corporation Directors
Deferred Compensation Plan, IDEX Corporation Deferred Compensation Plan for
Non-Officer Presidents and IDEX Corporation Deferred Compensation Plan for
Officers (the "Plans").

        We are familiar with the proceedings taken and proposed to be taken by
you in connection with the authorization, issuance and sale of the Stock and
the authorization of the Obligations, and for the purposes of this opinion,
have assumed such proceedings will be timely completed in the manner presently
proposed.  In addition, we have made such legal and factual examinations and
inquiries, including an examination of originals or copies 


   2



IDEX Corporation
December 23, 1996
Page 2


certified or otherwise identified to our satisfaction, of such documents,
corporate records and instruments as we have deemed necessary or appropriate
for purposes of this opinion.
        
        In our examination, we have assumed the genuineness of all signatures,
the authenticity of all documents submitted to us as originals, and the
conformity to authentic original documents of all documents submitted to us as
copies.

        We are opining herein as to the effect on the subject transaction only
of the federal laws of the United States, the internal laws of the State of
Illinois and the General Corporation Law of the State of Delaware, and we
express no opinion with respect to the applicability thereto, or the effect
thereon, of any other laws.

        Based on the foregoing, it is our opinion that the Stock, when issued
or sold in accordance with the terms of the Plans, will be duly authorized,
validly issued, fully paid and nonassessable and that the Obligations, when
arising under the Plans in accordance with their respective terms, will be duly
authorized, legally valid and binding obligations of the Company, except as may
be limited by the effect of bankruptcy, insolvency, reorganization, moratorium
or other similar laws now or hereafter in effect relating to or affecting the
rights or remedies of creditors; and the effect of general principles of equity
including without limitation concepts of materiality, reasonableness, good
faith and fair dealing and the possible unavailability of specific performance
or injunctive relief regardless of whether considered in a proceeding in equity
or at law.

        We consent to your filing this opinion as an exhibit to the
Registration Statement.

                                       Very truly yours,



                                       /s/ Latham & Watkins