Ifans was born in Haverfordwest, Pembrokeshire, Wales, in 1967, the son of Beti-Wyn (née Davies), a nursery school teacher, and Eirwyn Evans, a primary school teacher. He has a brother, actor Llŷr Ifans. Their first language was Welsh. Ifans grew up in Ruthin, Denbighshire, and received his primary education at Ysgol Pentrecelyn. He attended Ysgol Maes Garmon, a Welsh language secondary school in Mold, Flintshire, where he sat his O levels and A levels. He also attended youth acting schools at Theatr Clwyd, Mold, and trained at the Guildhall School of Music and Drama.
Early stage work by Ifans included Hamlet at Theatre Clwyd, A Midsummer Night's Dream at the Regent's Park Theatre, and Under Milk Wood and Volpone at the Royal National Theatre. He appeared at the Donmar Warehouse in 2003's Accidental Death of an Anarchist. In 2006 he returned to the London stage in Michael Grandage's production of Don Juan in Soho at the Donmar Warehouse. In 2016, Ifans played Fool alongside Glenda Jackson in Deborah Warner's production of King Lear, at the Old Vic.
Ifans appeared in many Welsh-language television programmes before embarking on his film career, including the comedy show Pobol y Chyff, as well as performing at the Royal National Theatre, London and the Royal Exchange Theatre, Manchester. In 1990, he presented Stwnsh (Welsh for "Mash"), an anarchic children's quiz programme. A total of 31 fifteen-minute programmes were broadcast on Welsh-language TV channel S4C.
He narrated the children's animated series Sali Mali for S4C in 2000.
In 2008, he appeared in "Six Days One June", one of three episodes of the TV series The Last Word Monologues, written by Hugo Blick and broadcast on BBC Two. He played a lonely Welsh farmer trying to free himself from a domineering mother.
In autumn 2016, Ifans portrayed hard-nosed American CIA case officer Hector DeJean in the new, 10-episode U.S. pay-cable Epix network espionage thriller drama series Berlin Station, which was filmed on location in Berlin, Germany.
Following his role as Jeremy Lewis in the Swansea-based movie Twin Town (1997), Ifans gained international exposure in his role as the slovenly housemate Spike in the British film Notting Hill (1999). Reportedly, in preparation for the role, Ifans did not wash himself or brush his teeth. He played Adrian, the pompous eldest brother in Little Nicky (2000). Other film roles include: Eyeball Paul in Kevin and Perry Go Large (2000), Nigel in The Replacements (2000), Iki in The 51st State (2001), William Dobbin in Vanity Fair (2004), and Vladis Grutas in Hannibal Rising (2007). He played Jed Parry in the film version of Ian McEwan's Enduring Love, and the lead role in Danny Deckchair (2003) as Danny Morgan.
Ifans revealed in March 2009 that he was to appear in Harry Potter and the Deathly Hallows – Part 1 (2010). He played Xenophillius Lovegood, editor of the wizarding magazine The Quibbler and father of the eccentric Luna Lovegood. In the same interview, he also announced that he would play the title role in the film Mr. Nice, based on the life of the drug smuggler Howard Marks. He played Nemo Nobody's father in Mr. Nobody, starring Jared Leto and Diane Kruger. He played a villain in Nanny McPhee and the Big Bang, which also starred Emma Thompson and Maggie Gyllenhaal.
On 11 October 2010, the Associated Press confirmed that Ifans would portray the villain in the Spider-Man reboot movie, The Amazing Spider-Man. The villain was revealed as the Lizard a few days later, and the film was released in July 2012.
In 2015, Ifans starred with Jennifer Aniston in She's Funny That Way, directed by Peter Bogdanovich.
He was briefly lead vocalist of the rock band Super Furry Animals before they released any records.
In 2005, Ifans made a guest appearance for the rock band Oasis in the video for their single "The Importance of Being Idle," for which he accepted their award for Video of the Year at the 2006 NME Awards. He has also appeared in the music videos for "God! Show Me Magic" and "Hometown Unicorn" by Super Furry Animals, "Mulder and Scully" by Catatonia, and "Mama Told Me Not to Come" by Tom Jones with Stereophonics.
Since 2007, Ifans has sung with the psychedelic rock band The Peth (peth is Welsh for "thing"), featuring Super Furry Animals' Dafydd Ieuan, which played a number of concert dates in south Wales and in London in the autumn of 2008. The band played its first date outside London or Wales on 28 September 2008 at the Southampton Soul Cellar.
In 2002, Ifans caused some controversy, reported in the British media, for his alleged support of Welsh nationalist group Meibion Glyndŵr, a militant group which burnt more than 100 empty second homes in Wales in the 1980s. This was mainly because of comments he made in an interview conducted by Mariella Frostrup for the newspaper The Observer.
In September 2012, Ifans became patron of the Welsh-language Wikipedia (Wicipedia Cymraeg), together with The Most Reverend Barry Morgan, Archbishop of Wales.
Ifans has a brother, Llŷr Ifans, who is also an actor. They starred together in the Welsh-produced film Twin Town.
During 2011 Comic Con, Ifans was arrested for misdemeanour battery by San Diego police, after allegedly pushing a guard prior to speaking on a guest panel. In August 2011, the local District Attorney's office announced that Ifans would not be charged due to lack of evidence.
In 2005, Ifans won a BAFTA for his portrayal of comedian Peter Cook in the TV film Not Only But Always.
On 16 July 2007, he received an Honorary Fellowship of Bangor University, for services to the film industry.