SanFranciscoCode.org is a non-profit, non-governmental, non-partisan implementation of The State Decoded brought to you by the folks at the OpenGov Foundation. It is part of a broader initiative to bring the laws of San Francisco to the people in more accessible, modern formats that can be used and reused to bring down the barriers to accessing, understanding and navigating the laws of San Francisco. You can read more about SF Open Law here. SanFranciscoCode.org provides a platform to display city-level legal information in a friendly, accessible, modern fashion. San Francisco is the second to municipality to deploy the software, joining Baltimore, MD, with more coming soon.

Beta Testing

SanFranciscoCode.org is currently in public beta, which is to say that the site is under active development, with known shortcomings, but it has reached a point where it would benefit from being used by the general public (who one hopes will likewise benefit from it). While every effort is made to ensure that the data provided on SanFranciscoCode.org is accurate and up-to-date, it would be gravely unwise to rely on it for any matter of importance while it is in this beta testing phase.

Many more features are under development, including calculations of the importance of given laws, inclusion of attorney generals’ opinions, court rulings, extensive explanatory text, social media integration, significant navigation enhancements, a vastly expanded built-in glossary of legal terms, scholarly article citations, and much more.

Data Sources

The data that powers San Francisco is available directly from the Office of the City Attorney with help from American Legal Publishing. The currently available Municipal Codes are posted to GitHub in unstructured TXT and RTF formats. They will also be available as a zip archive download from SFData (link forthcoming). The official code is maintained by American Legal Publishing and should be the primary reference for any legal questions. Even then, it is always good to consult with a lawyer when interpreting the law. You can find more about past, current and upcoming legislation at the San Francisco Legislative Research Center.


The site has a RESTful, JSON-based API. Register for an API key and read the documentation for details.


SanFranciscoCode.org wouldn’t be possible without the contributions and years of work by Waldo Jaquith, and the many dozens of people who participated in private alpha and beta testing of Virginia Decoded, the first Decoded site, over the course of a year and a half, beginning in 2010. This platform on which this site is based, The State Decoded, was expanded to function beyond Virginia thanks to a generous grant by the John S. and James L. Knight Foundation. Special thanks to the Board of Supervisors for formalizing and extending the Open Data Policy of the City and County of San Francisco. Particular thanks to Supervisors Chiu and Farrell for their leadership on Open Data and Open Law.


Hosted on CentOS, driven by Apache, MySQL, and PHP. Hosting by Rackspace. Search by Solr. Comments by Disqus.


This is not an official copy of the Municipal Codes of San Francisco and should not be relied upon for legal or other official purposes. Please refer to the Official Codes provided by American Legal Publishing for the verified and official codes. You may not modify these codes and then represent them as the original or official codes of the City and County of San Francisco. The code can only be officially changed through the legislative process and willfully misrepresenting modified code as the official code of the City and County of San Francisco is strictly prohibited.

The OpenGov Foundation, City and County of San Francisco offers Open Law data with no warranty as to accuracy or completeness.