
<PAGE>
                                                                                
                                                                     Exhibit 5.1


                               November 9, 1998


Universal Foods Corporation
433 East Michigan Street
Milwaukee, WI 53202


        Re: Registration Statement on Form S-3
            ----------------------------------

Ladies and Gentlemen:

     We have acted as counsel to Universal Foods Corporation, a Wisconsin 
Corporation (the "Company"), in connection with a registration statement on Form
S-3 (the "Registration Statement") filed under the Securities Act of 1933 for 
the purpose of registering $300,000,000 principal amount of the Company's debt 
securities (the "Securities") to be issued under an indenture (the "Indenture") 
between the Company and The First National Bank of Chicago, as trustee.

     We have examined executed copies of the Registration Statement, the
Indenture (including the form of Securities), and the Articles of Incorporation
and By-Laws of the Company, certain corporate resolutions of the Company, and
such other documents, records, certificates and agreements, and have made such
legal and factual investigations, as we have deemed necessary to enable us to
render the opinions expressed herein. As to the various matters of a factual
nature forming the basis for our opinions herein, we have relied, to the extent
we deemed appropriate, upon various representations made and information
furnished to us by various representatives of the Registrant. We have assumed
the authenticity of all documents and instruments represented to us to be
originals and the conformity to originals of all documents and instruments
represented to us to be copies of originals.

     We are admitted to the Bar of the State of Wisconsin. In rendering the
opinions expressed herein we have assumed that the applicable laws of the State
of New York (which govern the Indenture and the Securities) are identical in all
material respects to the laws of the State of Wisconsin.


<PAGE>

     In our opinion, the Indenture has been duly authorized, executed and
delivered by the Company and constitutes the legally binding and enforceable
obligation of the Company.

     In our opinion, when the Securities have been duly executed, authenticated
and delivered by the Company in conformity with the provisions of the Indenture
against payment therefor, the Securities will be validly issued and will be
legally binding and enforceable obligations of the Company.

     Our opinions expressed herein as to enforceability are subject to and
limited in each case by the effect of (1) bankruptcy, insolvency,
reorganization, arrangement, moratorium, and other laws affecting or relating to
the rights of creditors generally; (2) rules of law governing specific
performance, injunctive relief, or other equitable remedies and general
principles of equity; (3) the discretion of the court before which any
proceeding may be brought; and (4) certain rules of law which may render certain
provisions of the documents evidencing the Securities unenforceable in part, but
the unenforceability of such provisions will not preclude the practical
realization of the principal benefits and/or security intended to be provided
thereby.

     We consent to the filing of this opinion as an exhibit to the above-
referenced Registration Statement and any amendments thereto (including post-
effective amendments) and to the reference to this firm and to this opinion
under the caption "LEGAL MATTERS" in the Prospectus which forms a part of the
Registration Statement. In giving this consent we do not admit that we are
within the category of persons whose consent is required by Section 7 of the
Securities Act of 1993.

                              Very truly yours,
    
                              WHYTE HIRSCHBOECK DUDEK S.C.

                         By: /s/ Andrew J. Guzikowski
                             ----------------------------
                                 Andrew J. Guzikowski


                                       2

