The hard-working Brazil international joined the Blues from Benfica in the summer of 2010 and has since established himself as a key part of the midfield.
"I am very happy with my new contract. I am very happy with the support I have playing for this club so I want to say thank you to Chelsea," he told the club's official website.
Ramires' new deal comes just 24 hours after Chelsea sacked manager Andre Villas-Boas.
The Portuguese's departure has left uncertainty around the west London club with Roberto Di Matteo installed in temporary charge for the remainder of the season.
Ramires' signing will, however, offer some positive news as Chelsea look to get back on track in their quest to climb back up the Barclays Premier League table.
The weekend's 1-0 defeat at West Brom, Ramires' 50th Blues league appearance, prompted Villas-Boas' departure after it left them fifth in the table and three points behind Arsenal in the final Champions League qualification place.
Chelsea also face an important fortnight with an FA Cup fifth-round replay at Birmingham before they host Napoli in the second leg of the Champions League last-16 tie.
They head into that match trailing 3-1 on aggregate after defeat in the Stadio Sao Paolo last week.