
Insider Trading Policy Version: 3.0 Cognex Corporation Insider Trading Policy 1.0 POLICY OBJECTIVE, PURPOSE, SCOPE, REFERENCES 1.1 Objective The objective of this Policy is to help non-employee members of Cognex Corporation’s board of directors (“Directors”), officers of Cognex Corporation or an affiliate of Cognex Corporation (“Officers”), and employees of Cognex Corporation or an affiliate of Cognex Corporation (“Employees,” and together with Officers, “Cognoids”) comply with insider trading laws and to help prevent even the appearance of improper insider trading. “Cognex” means Cognex Corporation and affiliates of Cognex Corporation. 1.2 Purpose This Policy describes Cognex's global policy to promote compliance with securities laws with respect to purchases and sales of Cognex Corporation securities. 1.3 Scope This Policy applies to all Directors and Cognoids and their Affiliated Persons (“Insiders”). This Policy continues to apply to Insiders following the termination of such person’s service to or employment with Cognex until any Material Non-Public Information possessed by such person has been Widely Disseminated or is no longer material, whichever is earlier. 1.4 References This Policy should be read in conjunction with other relevant Cognex policies and procedures that can be found on Cognex’s 1 Vision Intranet site including Cognex’s Code of Business Conduct and Ethics. This Policy does not address disclosure of Cognex information generally, which is covered in the Employee Handbook and non-disclosure agreements, as applicable. 2.0 DEFINITIONS 2.1 “Affiliated Persons” means a person’s spouse, children, parents, siblings and any other members of their household; and any investment fund, trust, retirement plan, partnership, corporation or other entity over which such person has the ability to influence or direct investment decisions concerning securities. 2.2 “Known Insiders” means Directors, Officers, non-executive vice presidents and any Cognoid that by the nature of his or her job responsibilities has access to Material Non-Public Information (including certain financial information) regarding Cognex on a regular basis, and their respective Affiliated Persons. These positions include: the Corporate Controller, the heads of Tax and Investor Relations, and other specifically identified members of the Chief Financial Officer and/or Chief Executive Officer’s staff. The current list of Known Insiders is set forth on Appendix A. 2.3 “Material Non-Public Information” means information that is not yet generally known to the investing public and that could reasonably be expected to affect, whether positively or negatively, the investment or voting decisions of a shareholder or investor, significantly alter the total mix of information in the marketplace about Cognex, or could reasonably be expected to affect the market price of Cognex Corporation securities. While it is not possible to identify all information that would be deemed “material,” examples of material information include the following items:

Insider Trading Policy Version: 3.0 • Quarterly and annual bookings or financial results; • Financial guidance or outlooks; • Changes in previously disclosed financial results, guidance or outlooks; • The declaration of cash dividends, stock dividends, or stock splits, or any policy change thereto; • Joint ventures, mergers, acquisitions, dispositions or tender offers; • Changes in top management or the Board of Directors; • Major borrowings or the sale of additional securities; • Significant repurchases of stock, or intentions to do so; • Major legal actions filed by or against Cognex; • Significant new product launches or inventions; • A decision to take a material write-off; • A major change in the accounting treatment of financial statements; • The closing of a significant plant or other facility; and • The discontinuation or sale of a significant product line or business. 2.5 “Open Order” an order to buy or sell Cognex securities that remains in effect until it is either cancelled or executed. If subject to quiet periods, all Open Orders must be either cancelled or executed prior to entering a Quiet Period. If an Open Order exists when you obtain Material Non-Public Information, the Open Order must be cancelled immediately and not executed. If placing an Open Order with a broker, you should inform the broker that you are subject to this Policy, the pre-clearance procedures and quiet periods, as applicable, to help assure that all Open Orders are cancelled prior to any quiet periods. Exercise caution when placing Open Orders, such as limit orders, particularly where the order is likely to remain outstanding for an extended period of time, except in accordance with an Approved 10b5-1 Plan (as discussed below). Open Orders may result in the execution of a trade at a time when you are aware of Material Non-Public Information or are otherwise not permitted to trade in Cognex securities, which may result in inadvertent insider trading violations, Section 16 violations (for Reporting Insiders) and violations of this Policy. 2.6 “Widely Disseminated” with respect to Material Non-Public Information, means, once the information has been disclosed broadly to the marketplace, such as after a press release is widely distributed on the Cognex website or by a news or wire service such as PRNewswire, a Form 8-K or other report is filed with the U.S. Securities and Exchange Commission (“SEC”), or an announcement is made at a conference for which the public had adequate notice and to which the public was granted access. 3.0 PROHIBITED ACTIVITIES OF INSIDERS Insiders are prohibited from engaging in the following activities: 3.1 Trading, having others trade for the Insider, or recommending that another person trade (“tipping”), in (a) Cognex Corporation securities or (b) the securities of another publicly traded company (such as Cognex customers, vendors and suppliers) based upon Material Non-Public Information until the information has been Widely Disseminated. 3.2 Disclosing (including by posting on social media, an Internet chat room, message board, or similar Internet-based forum) Material Non-Public Information about (a) Cognex or (b) another publicly traded company (such as Cognex customers, vendors and suppliers) obtained through the Insider’s employment or association with Cognex to anyone except Cognoids or third-party agents (such as outside legal counsel) whose positions require them to know such information, until such information has been Widely Disseminated. This includes disclosure to a person’s family members, the media, investment analysts or others in the financial community, and other persons, regardless of whether they learn the information directly from the Insider or indirectly by overhearing the Insider discuss the information in a public place, such as on an elevator, airplane, or at social or business gatherings.

Insider Trading Policy Version: 3.0 Page: 3 of 6 3.3 Short selling (the sale of shares of Cognex Corporation stock that the seller does not own but instead borrows to sell) of Cognex Corporation stock. Such sales are made in anticipation of a decline in the price of Cognex Corporation stock to enable the seller to cover the sale with a purchase at a later date, at a lower price, and thus at a profit. Any Cognoid engaged in short sales of Cognex stock is subject to disciplinary action including immediate termination. 3.5 Entering into any hedging or monetization transactions or similar arrangements with respect to Cognex Corporation securities. Hedging means to purchase or sell financial instruments (including prepaid variable forward contracts, equity swaps, collars, and exchange funds), or otherwise engage in transactions, that hedge or offset, or are designed to hedge or offset, any decrease in the market value of Cognex Corporation securities. 3.6 Trading, either directly or indirectly, in exchange-traded options for Cognex Corporation stock or any similar type of instrument or contract for which the underlying basis is the future price of Cognex Corporation stock (“Derivatives”). An exchange-traded option is the right either to buy or to sell Cognex stock at a fixed price before the option’s expiration date. An exchange-traded option that gives right to buy Cognex stock is a call option, and an exchange- traded option that gives a right to sell Cognex stock is a put option. Any Cognoid found to be trading in Derivatives for Cognex stock is subject to disciplinary action including immediate termination. 4.0 PROHIBITED ACTIVITIES OF KNOWN INSIDERS In addition to the prohibited activities detailed above for Insiders, Known Insiders are prohibited from engaging in the following activities: 4.1 Pledging any Cognex Corporation securities as collateral for a loan unless the pledge has been approved by the Compensation Committee of the Cognex Corporation Board of Directors. 4.2 Giving or making any other transfer of Cognex Corporation securities without consideration (e.g., a gift) during a period when the Known Insider is not permitted to transact in Cognex Corporation securities. 4.3 Selling any Cognex Corporation securities of the same class during the six months following the purchase, or purchasing any Cognex Corporation securities of the same class during the six months following the sale. 5.0 PRE-CLEARANCE AND REPORTING OF TRANSACTIONS 5.1 All Known Insiders must receive pre-clearance from Cognex’s Chief Legal Officer or his or her designee (or if our Chief Legal Officer is the requestor, Cognex’s Chief Financial Officer or his or her designee) prior to engaging in any transaction(s) in Cognex Corporation securities (even when Cognex is not in a quiet period). A request for preclearance to engage in transactions involving Cognex Corporation securities should be submitted to our Chief Legal Officer via email no more than two business days in advance of the proposed transaction or Open Order. Clearance of a transaction does not constitute a recommendation by Cognex or any Cognoid that you engage in the proposed transaction. When a request for preclearance is made, the Known Insider should summarize the details of the proposed transaction and confirm in the request that he or she (i) has reviewed this Policy; and (ii) is not aware of any Material Non-Public Information. If our Chief Legal Officer grants preclearance, the Known Insider may make the trade or enter into an Open Order at any time within, but not after, two trading days of receipt of preclearance. If the Known Insider becomes aware of Material Non-Public Information before the transaction is completed (whether through an Open Order or otherwise), the preclearance shall be void and the transaction must not be completed. If permission to engage in the transaction is denied, the Known Insider must refrain from initiating any transaction in Cognex Corporation securities and may not inform any other person of the denial. 5.2 Directors and those Cognoids designated by the Cognex Board of Directors as “executive officers” for SEC reporting purposes (“Reporting Insiders”) are obligated to file certain reports with the SEC when they engage in transactions involving Cognex Corporation securities. Reporting Insiders are required to report to the Chief Legal Officer or

Insider Trading Policy Version: 3.0 Page: 4 of 6 Cognex’s Equity Manager any transaction (including any transactions pursuant to a Rule 10b5-1 Plan) in Cognex Corporation securities by them within one business day of the day in which the transaction occurs. The Reporting Insider retains responsibility for these reports regardless of who assists in their preparation and filing. 6.0 QUIET PERIODS; RULE 10B5-1 TRADING PLANS 6.1 From time-to-time, the Chief Legal Officer or his designee, at his or her discretion, may notify Insiders that they are subject to a Cognex-designated “quiet period.” Such Insiders and all Known Insiders are prohibited from transacting in Cognex Corporation securities during quiet periods, including under Open Orders (other than under an Approved Rule 10b5-1 Trading Plan). The current quiet period schedule is detailed in Appendix B. 6.2 The prohibition set forth in Section 6.1 does not apply to the exercise of stock options with no associated sale of the underlying stock. It does apply, however, to the use of outstanding Cognex Corporation securities to constitute part or all of the exercise price of a stock option, any same day sale of an option, or any other market sale. For purposes of this Section 6.2, “same day sale” of a stock option means the exercise of a stock option simultaneously with the sale of the underlying Cognex Corporation stock. As a result, the person does not use his or her cash to exercise a stock option, and instead receives the net proceeds from the transaction. 6.3 Cognex Corporation securities may be purchased or sold by Known Insiders without complying with the procedures set forth in Sections 6.1 and 6.2 under a pre-existing written plan, contract or instruction that satisfies the requirements of Rule 10b5-1 under the Securities Exchange Act of 1934, as amended (an “Approved Rule 10b5-1 Plan”) that: • has been pre-approved by Cognex’s Chief Legal Officer or his or her designee, before adopted (and, if modified, such modifications have been reviewed and approved by our Chief Legal Officer or his or her designee); • was adopted (and amended, if applicable) outside of a quiet period; • provides that no trades may occur thereunder until expiration of the applicable cooling-off period specified in Rule 10b5-1(c)(ii)(B), and no trades occur until after such cooling-off period; • was entered into in good faith by the Known Insider, and not as part of a plan or scheme to evade the prohibitions of Rule 10b5-1, at a time when the Known Insider is not in possession of Material Non- Public Information; and, if the Known Insider is a Director or Officer, includes representations certifying to that effect; • gives a third party the discretionary authority to execute purchases and sales, outside of the Known Insider’s control, so long as such third party does not possess any Material Non-Public Information; or explicitly specifies the securities to be purchased or sold, the number of shares, the prices and/or dates of transactions, or other formula(s) describing such transactions; • allows for only one Rule 10b5-1 Plan designed to effect the open-market purchase or sale of the total amount of securities as a single transaction (a single-trade plan) to be maintained by the Known Insider with a 12-month period; and • is the only outstanding Rule 10b5-1 Plan entered into by the Known Insider (subject to the exceptions set out in Rule 10b5-1(c)(ii)(D)). 6.4 The Known Insider should instruct the third party effecting such transactions on its behalf under an Approved 10b5- 1 Plan to send duplicate confirmations of all transactions to Cognex’s Equity Manager. 7.0 INDIVIDUAL RESPONSIBILITY Insiders are responsible for complying with this Policy and all applicable securities laws. Insiders are expected to exercise judgment prior to any transaction in Cognex Corporation securities. Each Director and Cognoid is responsible for ensuring

Insider Trading Policy Version: 3.0 Page: 5 of 6 compliance with this Policy by his or her Affiliated Persons. In all cases, the responsibility for determining whether an Insider is in possession of Material Non-Public Information rests with that individual, and any action on the part of Cognex or any Cognoid pursuant to this Policy does not in any way constitute legal advice or insulate an individual from liability under applicable securities laws. Insiders may have to delay a proposed transaction in Cognex Corporation securities even if they planned to make the transaction before learning of Material Non-Public Information and even though they believe they may suffer an economic loss or miss a profit by waiting. 8.0 COMPLIANCE; REPORTING VIOLATIONS 8.1 Any Cognoid, regardless of position or title, who violates any provision of this Policy may be subject to disciplinary action, up to and including termination of employment. 8.2 A person who violates insider trading laws by engaging in transactions in a company’s securities when he or she has Material Non-Public Information can be sentenced to a substantial jail term and required to pay a criminal penalty of several times the amount of profit gained or loss avoided. In addition, a person who recommends that another person trade based on Material Non-Public Information may also be liable for transactions by the person to whom he or she has disclosed Material Non-Public Information. The SEC can also seek substantial civil penalties from any person who, at the time of an insider trading violation, “directly or indirectly controlled the person who committed such violation.” 8.3 If any Director or Cognoid violates this Policy or any federal or state laws governing insider trading, or know of any such violation by any Insider, such person must report the violation immediately to the Chief Legal Officer or his or her designee (508-650-3000), or by submitting a complaint via Cognex’s third-party “Integrity Hotline,” which provides both phone-based and online anonymous reporting options (www.cognex.com/hotline). Such person may also raise the matter with the Chairman of the Audit Committee of our Board of Directors by U.S. mail to Audit Committee Chairman, Cognex Corporation, One Vision Drive, Natick, MA 01760. 9.0 ADMINISTRATION 9.1 Cognex reserves the right to change, modify, or delete the provisions of this Policy without notice. 9.2 The Legal Department is responsible for the administration of this Policy. All Cognoids are responsible for consulting and complying with the most current version of this Policy. If you have any questions about this Policy, please contact the Legal Department. APPENDIX A: LIST OF KNOWN INSIDERS This list is separately posted on the Investor Relations section of Cognex’s 1 Vision Intranet. Any change to the list of Known Insiders will be communicated via posting on the Investor Relations section of Cognex’s 1 Vision Intranet. APPENDIX B: QUIET PERIOD SCHEDULE This schedule is separately posted on the Investor Relations section of Cognex’s 1 Vision Intranet. Any change to the quiet period schedule will be communicated via posting on the Investor Relations section of Cognex’s 1 Vision Intranet.

Insider Trading Policy Version: 3.0 Page: 6 of 6 DOCUMENT TRACKING Policy Name Insider Trading Policy Policy Version V3.0 2024_December Policy Scope All Cognoids and Directors Policy Applicability All Cognex entities worldwide Policy Owner Legal Department Policy Review Frequency Every Three Years Policy Original Effective Date June 12, 2012 Policy Latest Revision Date December 16, 2024 Revision History Date M/D/Y Ver. Author Nature of Change 06/12/2012 V1.0 Investor Relations New Policy 10/27/2020 V2.0 Mark Fennell Updated Policy to align with Cognex practices 12/16/2024 V3.0 Mark Fennell Updated Policy to modernize and reflect current regulations