Exhibit 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in the Registration Statements on Form S-8 (No. 333-268833 and No. 333-288893) and Form S-3 (No. 333-287499) of John Marshall Bancorp, Inc. of our report dated March 13, 2026, relating to the consolidated financial statements of John Marshall Bancorp, Inc., appearing in the Annual Report on Form 10-K of John Marshall Bancorp, Inc. for the year ended December 31, 2025.
/s/ Yount, Hyde & Barbour, P.C.
Richmond, Virginia
March 13, 2026