Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” in this post-effective amendment No. 1 to the Registration Statement on Form S-3 (No. 333-254013) and related Prospectus of PS Business Parks, Inc. and PS Business Parks, L.P. dated May 20, 2021 for the registration of PS Business Parks, Inc.’s common stock, preferred stock, equity stock, depositary shares, warrants, debt securities, guarantees and units and of PS Business Parks, L.P.’s debt securities and guarantees. and to the incorporation by reference therein of our reports dated February 22, 2021, with respect to the consolidated financial statements of PS Business Parks, Inc., and the effectiveness of internal control over financial reporting of PS Business Parks, Inc., included in PS Business Parks, Inc.’s Annual Report (Form 10-K) for the year ended December 31, 2020, filed with the Securities and Exchange Commission.

/s/ Ernst & Young LLP

May 19, 2021

Los Angeles, California