Yes, you can sue your landlord for renting you an illegal apartment, and courts across the country recognize several legal theories that support these claims. An illegal unit typically means one without a certificate of occupancy, one that violates building or zoning codes, or one converted without required permits. Depending on the facts, you may recover rent you’ve already paid, get your full security deposit back, collect moving costs, and in some cases win punitive damages against a landlord who knew the unit was unlawful.
First, Confirm the Apartment Is Actually Illegal
The most reliable indicator is the absence of a certificate of occupancy. This document, issued by the local building department, confirms a property meets safety and habitability codes for residential use. If your landlord can’t produce one, or the building department has no record of one for your unit, the apartment may not be legally rentable. Basement and attic conversions are common offenders because they often lack the required ceiling height, emergency exits, or ventilation.
Zoning violations are another red flag. A single-family home carved into multiple rental units without municipal approval violates zoning ordinances in most jurisdictions. The same goes for commercial or industrial spaces converted into living quarters. You can usually check your property’s zoning classification through your local planning department.
Safety deficiencies can also make a unit illegal under local building codes: missing smoke detectors, no carbon monoxide alarms, inadequate electrical wiring, blocked exits, or the absence of proper egress windows in bedrooms. For units receiving federal housing assistance, HUD’s national housing standards require working smoke detectors on every level, ground-fault circuit interrupter protection near water sources, and guardrails on elevated surfaces, among other requirements.1eCFR. 24 CFR 5.703 – National Standards for the Condition of HUD Housing Local codes for private-market rentals often impose similar or stricter standards.
Your Lease May Be Void from the Start
Before you even reach the question of damages, know this: a lease for an illegal apartment may be void from the moment it was signed. Under long-established contract law, an agreement that violates a statute or municipal ordinance designed to protect public safety is treated as illegal and unenforceable. Courts have applied this principle to residential leases for decades, and it holds even when the tenant knew about the violation at signing.
The practical takeaway is significant. If the lease is void, the landlord cannot enforce it against you. You likely can leave without penalty, and you may be entitled to recover rent already paid under what amounts to a contract that never should have existed. Courts in many jurisdictions have ordered landlords to return all rent collected on illegal units. Not every court treats these leases as fully void, though. Some treat them as voidable, giving the tenant the option to cancel but not automatically wiping the agreement out. An attorney familiar with your local rules can tell you which approach your jurisdiction follows.
Legal Theories That Support the Lawsuit
Breach of the Implied Warranty of Habitability
The implied warranty of habitability is recognized in most U.S. jurisdictions and requires landlords to maintain rental property in a condition that is safe and fit for human habitation, even if the lease says nothing about repairs. Habitability generally means substantial compliance with applicable housing codes or, where no code exists, basic health and safety standards. An apartment that lacks a certificate of occupancy or violates building codes almost by definition fails this standard.
Fraud and Misrepresentation
If your landlord knew the unit was illegal and rented it to you anyway without disclosure, that is fraud. The claim is strongest when the landlord actively concealed the unit’s status, such as by showing you a fake certificate of occupancy or describing an unpermitted basement conversion as a “legal apartment” in the listing. Fraud claims can unlock punitive damages, which go beyond compensating your losses and are designed to punish the landlord’s conduct. Courts generally look at how egregious the behavior was, whether it was a pattern, and the landlord’s financial resources when setting the amount.
Breach of Contract
Even in jurisdictions where the lease isn’t treated as outright void, renting an illegal unit is a breach of the lease agreement. Landlords have an obligation to deliver a unit that complies with applicable law, and an illegal apartment doesn’t meet that bar. Breach of contract claims allow you to recover the financial losses caused by the landlord’s failure to perform.
Breach of the Covenant of Quiet Enjoyment
Every residential lease carries an implied covenant of quiet enjoyment, meaning the landlord won’t interfere with your ability to live peacefully in the unit. When code enforcement shows up, orders repairs that make the unit uninhabitable during construction, or issues a vacate order, the landlord has effectively broken that promise. This theory is especially useful when the illegality doesn’t directly make the apartment unlivable but triggers government action that does.
Constructive Eviction
If conditions in your illegal apartment become bad enough that you’re forced to leave, you may have a constructive eviction claim. This doesn’t require the landlord to formally evict you. It applies when the landlord’s actions or inaction make the unit essentially unusable, and you leave as a result. To succeed, you generally need to show three things: the landlord substantially interfered with your ability to use the apartment, you notified the landlord and gave them a chance to fix the problem, and you moved out within a reasonable time after they failed to act.
The critical requirement is that you actually vacate. If you stay in the apartment, most courts won’t recognize the claim. That creates a tough situation, because you have to leave before filing suit, which means paying for new housing before you’ve recovered anything. The upside of a successful constructive eviction claim is that it releases you from all remaining lease obligations and entitles you to damages.
What You Can Recover
The damages available to tenants of illegal apartments can be surprisingly broad:
- Rent reimbursement. Courts in many jurisdictions have ordered landlords to return all rent paid during a tenancy in an illegal unit. Even where full reimbursement isn’t available, you can typically recover the difference between what you paid and the actual value of the apartment in its defective condition.
- Security deposit. You’re entitled to the full return of your deposit. Many states impose double or triple damages on landlords who wrongfully withhold security deposits, and renting an illegal unit makes it very difficult for a landlord to justify keeping any portion.
- Moving and relocation costs. If you’re displaced because of the unit’s illegality, whether by a government vacate order or because conditions forced you out, the landlord can be held liable for your moving expenses, temporary housing costs, and the price difference if comparable housing costs more.
- Emotional distress. Courts have awarded emotional distress damages in these cases, particularly when the landlord’s conduct was knowing or reckless.
- Punitive damages. Available in fraud cases and situations where the landlord’s conduct was egregious. These are meant to punish, not just compensate, so they can substantially exceed your actual losses.
One related option while you’re still in the unit: many states allow tenants to withhold some or all of their rent when serious habitability defects exist. The safer approach is to deposit withheld rent into an escrow account rather than simply not paying, which shows a court you acted in good faith. The risk is real, though. If a court later decides the problems weren’t serious enough to justify withholding, the landlord can evict you for nonpayment. Get legal advice before pulling the trigger.
Build Your Evidence Now
A strong case is built before you file anything. Start gathering evidence the moment you suspect the unit is illegal.
Your first stop should be the local building department. Request the property’s permit history and certificate of occupancy records. Most building departments maintain public records going back decades, and many now allow online searches. If no certificate of occupancy exists for your unit, that absence becomes the backbone of your case. These records requests are typically inexpensive and processed within a few weeks.
Photograph everything. Missing egress windows, exposed wiring, blocked fire exits, lack of smoke detectors, ceiling heights that look too low. Document all of it with timestamps. Video walkthroughs can be even more compelling than still photos because they show the unit’s overall condition in context.
Save every communication with your landlord. Emails, texts, voicemails, and letters where you raised concerns about the unit’s condition or legality are valuable, especially if the landlord’s responses reveal they knew about the problems. If you’ve had verbal conversations about the unit’s status, follow up with an email summarizing what was said. That creates a paper trail even for informal discussions.
Keep all financial records: your lease, rent receipts or bank statements showing payments, the security deposit receipt, and any expenses you’ve incurred because of the unit’s problems. Movers, hotels, deposits on a new apartment after a vacate order. Any code enforcement notices, violation citations, or inspection reports the city has issued for the property should also be part of your file.
How and Where to File
For smaller claims, small claims court is often the fastest and most affordable option. Monetary limits vary widely, from $2,500 in some states to $25,000 in others, and some states set different caps for landlord-tenant disputes specifically. Filing fees generally range from $30 to a few hundred dollars depending on the court and the amount you’re seeking, and fee waivers are available for tenants who qualify based on income. You typically don’t need a lawyer for small claims court.
For larger claims, especially those involving significant rent reimbursement, punitive damages, or multiple legal theories, filing in a higher court with attorney representation is the better route. The process starts with drafting a complaint that lays out what the landlord did wrong and what you’re seeking. Once filed, the landlord must be formally served with the complaint and a summons. The landlord then generally has 20 to 30 days to respond, though this window varies by jurisdiction and how service was accomplished.
Check the statute of limitations before you commit. The deadline varies by state and by claim type. Contract-based claims (breach of lease, breach of warranty) typically have limitations periods ranging from three to six years, while fraud claims may have shorter windows, often two to three years. The clock usually starts running when you discover the illegality, not when you first signed the lease, but don’t rely on that assumption without checking your state’s rules.
Report the Unit to Code Enforcement
Filing a complaint with your local building or code enforcement department is one of the most practical steps you can take, and it serves double duty. It creates an official government record of the unit’s violations, and it triggers an inspection process that may force the landlord to bring the property into compliance or stop renting it.
Contact your local code enforcement office, usually part of the building department or a standalone agency, and describe the issues. An inspector will schedule a visit. If violations are confirmed, the city issues a notice to the landlord requiring corrections within a set timeframe. Serious safety hazards can result in an immediate vacate order, which means you’ll need to leave quickly but significantly strengthens any lawsuit because the government itself has declared the unit unfit.
One detail worth knowing: some agencies require you to provide your name and contact information, meaning complaints may not be anonymous.
Protection Against Retaliation
Over 40 states have anti-retaliation statutes that prohibit landlords from evicting, harassing, or raising rent on tenants who report code violations or exercise their legal rights. If your landlord tries to evict you after you file a complaint or a lawsuit, the timing itself works in your favor. Most of these statutes create a presumption that an eviction is retaliatory if it comes within a set period after the tenant’s protected activity, typically six months to one year. During that window, the landlord bears the burden of proving they had a legitimate, non-retaliatory reason for the eviction.
Retaliation protection doesn’t just cover formal eviction proceedings. It also applies to rent increases, reduction of services, and other actions a landlord might take to pressure you into dropping a complaint. If you’re experiencing retaliation, document everything and raise it as a defense in any eviction proceeding. In many jurisdictions, retaliatory eviction is a complete defense, meaning the court will throw out the eviction case entirely.
Relocation Assistance If You’re Displaced
Some jurisdictions require landlords to pay relocation assistance when tenants are forced out of illegal units, particularly when a government agency issues a vacate order. Requirements vary enormously by location. Some cities tie the payment amount to the tenant’s monthly rent, requiring the landlord to pay the greater of a fixed dollar amount or a multiple of the monthly rent. Others factor in the tenant’s age, disability status, income level, and how long they’ve lived in the unit.
Even in jurisdictions without a formal relocation assistance mandate, courts can order landlords to cover relocation costs as part of a damage award in a lawsuit. The key difference is speed. Mandatory relocation programs pay out quickly, often within 15 days of the vacate notice, while recovering relocation costs through litigation takes much longer. If your city has a relocation assistance program, take advantage of it right away. It doesn’t prevent you from also suing for additional damages.