Filing as exempt is not illegal. If you meet the criteria for filing as exempt you should file exempt on your W-4. Even if you qualify for a federal tax exemption, your employer will still withhold Social Security and Medicare taxes.
Is it better to claim 0 or exempt?
Claiming 0 on Your Taxes
When you claim 0 on your taxes, you are having the largest amount withheld from your paycheck for federal taxes. If your goal is to receive a larger tax refund, then it will be your best option to claim 0.
Will I go to jail for claiming exempt?
The IRS is much more forgiving with people who can't pay as opposed to non-filers who don't pay. So late filing penalties are much higher than late payment penalties. The IRS will not put you in jail for not being able to pay your taxes if you file your return.