| Year | Title | Role | Notes and awards |
| 2000 | The Patriot | William Martin | Nominated – Young Artist Award for Best Ensemble in a Feature Film |
| What Women Want | Young Nick Marshall | |
| 2001 | Riding in Cars with Boys | Jason (age 8) | |
| 2004 | The Butterfly Effect | Evan Treborn (age 7) | |
| 2006 | Hoot | Roy Eberhardt | Young Artist Award for Best Leading Young Actor in a Feature Film |
| 2007 | Meet Bill | The Kid | |
| The Number 23 | Robin Sparrow | |
| 3:10 to Yuma | William Evans | Nominated – Screen Actors Guild Award for Outstanding Performance by a Cast in a Motion PictureNominated – Young Artist Award for Best Leading Young Actor in a Feature Film |
| 2009 | Gamer | Simon Silverton | |
| My One and Only | George Deveraux (age 15) | |
| 2010 | Percy Jackson & the Olympians: The Lightning Thief | Percy Jackson | Nominated – MTV Movie Award for Best Breakthrough PerformanceNominated – MTV Movie Award for Best Fight (shared with Jake Abel)Nominated – Saturn Award for Best Performance by a Younger ActorNominated – Teen Choice Award for Choice Movie: Fight (shared with Jake Abel)Nominated – Teen Choice Award for Choice Movie: Breakout Male |
| 2011 | The Three Musketeers | d'Artagnan | Nominated – Teen Choice Award for Choice Movie Actor: Action |
| 2012 | The Perks of Being a Wallflower | Charlie Kelmeckis | San Diego Film Critics Society Award for Best Performance by an EnsembleTeen Choice Award for Choice Movie Actor: DramaNominated – Broadcast Film Critics Association Award for Best Young PerformerNominated – MTV Movie Award for Best Kiss (shared with Emma Watson)Nominated – MTV Movie Award for Best Musical Moment (shared with Emma Watson and Ezra Miller)Nominated – Teen Choice Award for Choice: Liplock (shared with Emma Watson)Nominated – Washington D.C. Area Film Critics Association Award for Best Youth Performance |
| 2013 | Percy Jackson: Sea of Monsters | Percy Jackson | |
| Stuck in Love | Lou | |
| 2014 | Fury | Norman Ellison | National Board of Review Award for Best Cast Santa Barbara International Film Festival Virtuosos AwardNominated – Phoenix Film Critics Society Award for Best Supporting Actor |
| Noah | Ham | |
| 2016 | Indignation | Marcus Messner | Also executive producer |
| 2017 | The Vanishing of Sidney Hall | Sidney Hall | Also executive producer |
| 2018 | Sgt. Stubby: An American Hero | Robert Conroy | Voice role |
| 2019 | End of Sentence | Sean Fogle | |
| 2020 | Shirley | Fred Nemser | |
| 2022 | Press Play | — | Producer |
| Bullet Train | The Son | |
| 2024 | Skincare | — | Producer |
| 2025 | Oh, Hi! | Isaac | |