Under California and Federal law, it is possible for a for-profit corporation to convert to a nonprofit entity. This conversion really has two components: i) making the change for state law entity purposes, and ii) seeking and obtaining tax exempt status for the now, nonprofit entity.
With respect to legal conversion, there is a unique section in the California Corporation's Code which allows a corporation to convert to a California Nonprofit Public Benefit Corporation, simply by amending its articles of incorporation. (See Cal. Corp. Code Sec. 911.) Oddly, this provision is not grouped with all the other provisions that deal with corporate conversions but is part of the section of the code that deals with amending articles. This distinction means that there is no "converting" or "converted" entity or "terminated" and "surviving" entity as is the case under the normal statutory conversion sections. In essence, a conversion under Sec. 911 means the entity is the same entity as before--it is just a classified differently.
Of course, amending the articles appropriately is only part of the process--the entity must still apply for tax-exempt status at both the state and federal level. This is done by filling out IRS form 1023. Note that if you have converted from a for-profit to a nonprofit, there is a separate Schedule G to the form 1023 that must be filled out where you are to explain why the conversion occurred and what relationships various parties have to the entity. The biggest question is why would an entity that is making money, apparently for commercial reasons, want to switch to non-profit status? The IRS will want to ensure that there is no self-dealing or private inurement to certain owners and officers as a result of the conversion. Assuming the IRS grants tax-exempt status, the entity can easily seek tax exempt status at the state level.
Curiously, one grey area is whether or not the entity must acquire a new EIN for tax reporting purposes. The guidance provided by the IRS on this matter is unclear and subject to varying interpretations. Typically, most entities prefer to retain their own EIN so there is less administrative burden.
On final aspect are the tax implications that are involved. In particular, most C corporations prefer to bonus out employees at the end of the year so that there is minimal corporate income (in an effort to minimize corporate level taxes).When a conversion is made, consideration should be given as to the timing of corporate income and expenses so that as much of the corporate expenses are allocated to the time frame when the corporation is a nonprofit.