There are fees associated with filing for bankruptcy, but some, if not all, of those fees can be waived depending on your circumstances. Bankruptcy court requires a $338 filing fee, but that fee could be waived if:
You are on social security.
You are unemployed.
You earn below 150% of the Federal Poverty Line.