Exhibit 5.1

Opinion of Latham & Watkins

March 22, 2005

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

            Re:   Registration Statement on Form S-8 with respect to 2,300,000
                  shares of Common Stock, par value $.01 per share

Ladies and Gentlemen:

            In connection with the preparation and filing by IDEX Corporation, a
Delaware corporation (the "Company"), with the Securities and Exchange
Commission (the "Commission") under the Securities Act of 1933, as amended (the
"Act"), of a Registration Statement on Form S-8 (the "Registration Statement")
relating to the issuance by the Company of 2,300,000 shares of the Company's
Common Stock, par value $.01 per share (the "Shares"), under the terms of the
IDEX Corporation Incentive Award Plan (the "Plan"), you have requested our
opinion with respect to the matters set forth below.

            In our capacity as your counsel in connection with such
registration, we are familiar with the proceedings taken by the Company in
connection with the authorization, issuance and sale of the Shares. In addition,
we have made such legal and factual examinations and inquiries, including an
examination of originals or copies 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 General Corporation Law of the State of Delaware, and we express no
opinion with respect to the applicability thereto, or the effect thereon, of the
laws of any other jurisdiction or any other Delaware laws, or as to any matters
of municipal law or the laws of any local agency within any state.

            Subject to the foregoing, it is our opinion that the Shares have
been duly authorized and, when issued and delivered pursuant to the terms of the
Plan, will be validly issued, fully paid and non-assessable.

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

                                              Very truly yours,

                                              Latham & Watkins LLP