Exhibit 5.1

Josh Seidenfeld
+1 650 843 5862
jseidenfeld@cooley.com
December 16, 2022
Rani Therapeutics Holdings, Inc.
2051 Ringwood Avenue
San Jose, California 95131
Ladies and Gentlemen:
We have acted as counsel to Rani Therapeutics Holdings, Inc., a Delaware corporation (the “Company”), in connection with the filing by the Company of a Registration Statement on Form S-3 (the “Registration Statement”) with the Securities and Exchange Commission, including a prospectus included in the Registration Statement (the “Prospectus”), covering the resale of up to 6,009,542 shares (the “Shares”) of Class A common stock, par value $0.0001 per share, of the Company (“Class A Common Stock”) by the selling stockholders identified in such Registration Statement, consisting of (i) 533,740 shares (the “Exchange Shares”) of Class A Common Stock issuable upon the exchange of outstanding Class A common units of Rani Therapeutics, LLC (“Rani LLC”), combined with the cancellation of an equivalent number of shares of Class B common stock, par value $0.0001 per share, of the Company (“Class B Common Stock”), in each case in accordance with the certificate of incorporation of the Company and the limited liability company agreement of Rani LLC and (ii) 5,475,802 shares (the “Outstanding Shares”) of currently outstanding Class A Common Stock.
In connection with this opinion, we have examined and relied upon (a) the Registration Statement and the Prospectus, (b) the Company’s certificate of incorporation and bylaws, each as currently in effect and (c) originals or copies certified to our satisfaction of such opinions, records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. We have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies thereof, the accuracy, completeness and authenticity of certificates of public officials and the due authorization, execution and delivery of all documents by all persons other than the Company where due authorization, execution and delivery are prerequisites to the effectiveness thereof. As to certain factual matters, we have relied upon a certificate of an officer of the Company and have not independently verified such matters.
Our opinion herein is expressed solely with respect to the General Corporation Law of the State of Delaware. We express no opinion to the extent that any other laws are applicable to the subject matter hereof and express no opinion and provide no assurance as to compliance with any federal or state securities law, rule or regulation.
On the basis of the foregoing, and in reliance thereon, and subject to the qualifications set forth herein, we are of the opinion that the (i) Exchange Shares will be validly issued, fully paid and nonassessable when issued upon the exchange of outstanding Class A common units of Rani LLC, combined with the cancellation of an equivalent number of shares of Class B Common Stock, in each case in accordance with the certificate of incorporation of the Company and the limited liability company agreement of Rani LLC and (ii) the Outstanding Shares are validly issued, fully paid and nonassessable.
Cooley LLP 3175 Hanover Street Palo Alto, CA 94304-1130
t: (650) 843-5000 f: (650) 849-7400 cooley.com