Yes. All 7 Harry Potter books have been available as e-books since 2015 (Pottermore launch, now Wizarding World Digital).
Platforms:
Also available as audiobooks (Stephen Fry / Jim Dale narrations).