No it is illegal for a landlord to lock out a tenant in NYC without a court order. This is considered a “self-help eviction,” which violates New York City housing laws and can result in fines or legal action against the landlord.
Examples of Illegal Lockouts:
- Changing the locks without notice
- Removing the tenant’s belongings
- Denying access to the building or unit
- Cutting off essential services (e.g. heat, electricity, water) to force a tenant to leave
According to the New York City Housing Maintenance Code (§ 27-2004) and Real Property Law § 235, tenants have the right to quiet possession of their home unless evicted through the court.
🚪 What to Do If You’ve Been Locked Out by a Landlord
If you believe you’ve been illegally locked out:
- Document Everything:
- Take photos of the locked door, removed belongings, or posted notices
- Save text messages or emails from your landlord
- Call 311 or the Police (if necessary):
- File a complaint with the NYC Department of Housing Preservation & Development (HPD)
- If you’re in immediate danger or your safety is at risk, call the NYPD
- Contact a Tenant Lawyer or Legal Aid:
- You may be entitled to emergency relief through Housing Court
- NYC’s Right to Counsel program provides free legal help to qualifying tenants
- Regain Entry (If It’s Safe to Do So):
- If you’ve simply been locked out (and not evicted legally), you may choose to call a licensed locksmith like Rainbow Locksmith NY to regain access.
- We may request proof of identity and residence before unlocking the door, to ensure safety and legal compliance.
🛑 Important: If the lockout is due to a court-ordered eviction, locksmiths cannot help you regain access. You’ll need to go through Housing Court.

🗽 Your Rights as a Tenant in NYC
- You cannot be locked out without a court judgment and legal eviction process
- Landlords must go through Housing Court and receive a formal warrant of eviction
- Tenants are entitled to notice, a hearing, and legal representation
If you’ve been locked out without due process, you have the right to sue for damages and re-entry.
🧰 When to Call Rainbow Locksmith NY
If you’re locked out due to:
- Lost keys
- Damaged locks
- Broken key inside the lock
- Accidental lockout
- Malfunctioning electronic locks or intercoms
…we can help you safely regain access, 24/7, across NYC.
We handle all types of apartment locks:
- Deadbolts
- Mortise locks
- Key fob systems
- Intercom entry
- Smart locks and more
👉 Learn more: Apartment Lockout Service in NYC »
👨⚖️ Legal Resources for Tenants in NYC
If your lockout situation involves landlord retaliation, illegal eviction, or unresolved housing disputes, here are some places to turn for help:
- NYC Housing Preservation & Development (HPD)
- Housing Court Answers
- Legal Aid Society
- NYC Tenant Helpline: 311
🧭 Final Thoughts: Know Your Rights and Get Help Fast
NYC tenants have strong legal protections but that doesn’t make lockouts any less stressful. Whether your situation is accidental or unlawful, Rainbow Locksmith NY is here to support you with fast, professional, 24/7 apartment lockout assistance.
If you’re legally allowed to enter but can’t get in, give us a call. We’ll verify your ID and get you back inside damage-free.
📞 Need Immediate Lockout Help?
Call Rainbow Locksmith NY 24/7 at (212) 879-5516






