Retirement tax questions

So, there are two different things going on here.

 

First:

401k plans may allow hardship withdrawals (they don't have to).  If they do, then the type of hardship allowed and the proof required is up to the plan.  You won't be audited for the early withdrawal, but the plan could be audited, so ask them what kind of proof they want.

 

Your Roth 401k contributions were already taxed, but the earnings were never taxed, and if you withdraw earnings before age 59-1/2, you will pay regular income tax on the earnings.  As @dmertz indicated, your withdrawal will be a mix of earnings and contributions, and only you or your plan can guess at what the ratio will be.  You should ask your plan before making the withdrawal.

 

As a rough estimate, suppose you have contributed $50,000, and the balance is $100,000.  Since 50% of the balance is non-taxable earnings, 50% of any withdrawal will be non-taxable, and the other 50% will be taxable plus a 10% penalty.

 

Second:

If you withdraw money after the child is born, you are exempt from the 10% penalty for early withdrawal for the first $5000 of taxable earnings that you withdraw.  Here, the exemption is up to you, not the plan, so you would probably need a birth certificate if audited.  

 

In the example above, suppose you withdraw $20,000, and $10,000 is taxable.  If you make the withdrawal after the child is born, then you would pay income tax plus 10% penalty on $5000, and income tax only (but no penalty) on the other $5000.  The penalty exemption is not allowed if the money is withdrawn before the birth, so you might want to wait, or to split up your withdrawal into some before and some after.