The NYPD’s counterterror chief on Sunday trashed a city council bill that would force the department to reveal surveillance methods and other key secrets it employs to track and foil terror plots.

“It would be a law that would endanger people because it would help criminals and terrorists,” said John Miller, referring to the council’s proposed Public Oversight of Surveillance Technology Act.

“It would endanger police officers because it would allow criminals to learn way too much, way too easily.”

The bill would require the NYPD to issue reports on what kinds of spy equipment police use — such as license-plate readers, cellphone trackers and X-ray vans used to peer through walls — as well how the department stores and protects private information collected.

Doing so would essentially be opening the NYPD’s playbook to potential attackers and help them evade cops.

“They are talking about the kinds of hidden video equipment we would use to record a meeting between terrorist leaders who are plotting to do a bombing in New York City,” Miller said.

The bill was introduced by councilmembers Dan Garodnick (D-Manhattan) and Vanessa Gibson (D-Bronx).

The New York Civil Liberties Union is also suing to get police to reveal similar crime and terror-fighting info.

“Nobody is going to call the ACLU down to the City Council or Congress because we have a terrorist attack,” Miller said.

“That is going to be me at that table with the police commissioner and the chief of detectives answering those questions.”