EX-5.1 4 d12080dex51.htm EX-5.1

Divakar Gupta +1 (212) 479-6474 dgupta@cooley.com |  | Exhibit 5.1

September 8, 2025

LB Pharmaceuticals Inc

One Pennsylvania Plaza, Suite 1025

New York, NY 10119

Ladies and Gentlemen:

We have acted as counsel to LB Pharmaceuticals Inc, a Delaware corporation (the “Company”), in connection with the filing by the Company of a registration statement (No. 333-289812) on Form S-1 (the “Registration Statement”) with the Securities and Exchange Commission (the “Commission”), including a related prospectus included in the Registration Statement (the “Prospectus”), covering an underwritten public offering of up to 16,666,667 shares (the “Shares”) of its common stock, par value $0.0001 per share, including up to 2,500,000 Shares that may be sold pursuant to the exercise of an option to purchase additional Shares granted to the underwriters.

In connection with this opinion, we have (i) 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, (c) the Company’s Amended and Restated Certificate of Incorporation and Amended and Restated Bylaws, filed as Exhibits 3.3 and 3.5 to the Registration Statement, respectively, each of which is to be in effect in connection with the closing of the offering contemplated by the Registration Statement and (d) such other records, documents, opinions, certificates, memoranda and instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below and (ii) assumed that (a) the Shares will be sold at a price established by the Board of Directors of the Company or a duly authorized committee thereof and (b) the Amended and Restated Certificate of Incorporation referred to in clause (i)(c) is filed with the Secretary of State of the State of Delaware before issuance of the Shares.

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, 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. 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 is expressed only 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, in reliance thereon and subject to the assumptions, qualifications, limitations and exceptions contained herein, we are of the opinion that the Shares, when sold and issued against payment therefor as described in the Registration Statement and the Prospectus, will be validly issued, fully paid and nonassessable.

Cooley LLP 55 Hudson Yards New York, NY 10001

t: +1 (212) 479-6000 f: +1 (212) 479-6275 cooley.com

LB Pharmaceuticals Inc

Page 2

This opinion is limited to the matters expressly set forth in this letter, and no opinion has been or should be implied, or may be inferred, beyond the matters expressly stated. This opinion speaks only as to law and facts in effect or existing as of the date hereof, and we have no obligation or responsibility to update or supplement this letter to reflect any facts or circumstances that may hereafter come to our attention or any changes in law that may hereafter occur.

We consent to the reference to our firm under the caption “Legal Matters” in the Prospectus included in the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. In giving such consents, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the rules and regulations of the Commission thereunder.

Sincerely,

Cooley LLP

By: |  | /s/ Divakar Gupta |  |
|  | Divakar Gupta |  |

Cooley LLP 55 Hudson Yards New York, NY 10001

t: +1 (212) 479-6000 f: +1 (212) 479-6275 cooley.com