Democracies rely on thriving civil societies where individuals and communities can express themselves outside of markets and government. We need a transition plan that will enable civil society to thrive in a digital age, where the infrastructure is commercially owned and surveilled by both governments and companies. This transition plan needs three kinds of codes - new software code, new organizational codes, and (probably) new legal codes to protect this independent space. New software code that will power digital tools that default to the values of free and private association and free expression. New organizational codes that guide foundations, nonprofits and civic organizations to act ethically, safely, securely, and effectively. New legal codes - for new forms of governance, data security and destruction, and informed consent that protect the voluntary nature of civil society.