Exhibit 23.1


CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the following Registration Statements of BioMarin Pharmaceutical Inc.:

1.Registration Statement (Form S-8 No. 333-136963)
2.Registration Statement (Form S-8 No. 333-168552)
3.Registration Statement (Form S-8 No. 333-188620)
4.Registration Statement (Form S-8 No. 333-206094)
5.Registration Statement (Form S-8 No. 333-218695)
6.Registration Statement (Form S-8 No. 333-234231)
7.Registration Statement (Form S-8 No. 333-262824)
8.Registration Statement (Form S-8 No. 333-275273)
9.Registration Statement (Form S-8 No. 333-289250)

of our report dated February 20, 2026, relating to the consolidated financial statements of Amicus Therapeutics, Inc. as of December 31, 2025 and 2024 and for each of the three years in the period ended December 31, 2025 appearing in this Current Report on Form 8-K/A of BioMarin Pharmaceutical Inc.


/s/ Ernst & Young LLP

Iselin, New Jersey
July 13, 2026