A cheap headlamp is fine for most hikers, because most hikers only use one to walk the last mile out after sunset. You need enough light to see roots and rocks, a red mode that saves your night vision, and a lock so it doesn't drain itself in the pack. Not every cheap lamp has all three, so the table below says which ones do.
I ranked these on what matters on a trail rather than on the biggest number on the box. A lamp that claims 400 lumens and holds it for a few minutes is less useful than one that holds a steady medium beam all evening. Power counts too: a sealed USB-C battery is light and simple, AAA cells can be swapped on the trail.
We haven't carried every one of these. They're ranked from the makers' published specs, Amazon buyer reviews and AI-assisted research, the same way we rank everything here. If you hike in the dark on purpose, the premium lamps on our night-hike and running guides cost two to three times as much and buy you longer runtimes, regulated output and better batteries.