Can I attend a job interview in the US on ESTA?
Usually yes, if you only interview and go home. Starting work, training or being paid for anything beyond expenses is not allowed on ESTA.
Usually yes, as long as the trip is the interview and nothing more. A Visa Waiver traveler may enter for business-visitor purposes, which the State Department describes as consulting with business associates, attending conferences and negotiating contracts, and an interview with a prospective employer is generally treated as part of the same family of activities (9 FAM 402.2). What is not allowed is working, being paid for work done in the United States, or arriving to start a job.
Where the line sits
An interview is an exchange of information before employment. Meeting a hiring manager, taking a technical test, presenting to a panel, and having lunch with the team are all things a candidate does before being hired. The traveler comes back out without having earned anything.
The line is crossed when the visit begins to look like a trial of the work itself. A "paid trial week", a project completed for the company, shadowing that involves doing tasks, or an onboarding session after an offer has been accepted can be treated as unauthorized employment. The program does not allow a visitor to start a job, and it does not allow a change of status afterward (8 CFR 217.3).
Money
A company can pay for a flight, a hotel and meals as reimbursement of expenses. It cannot pay a fee for time or work. If the employer wants to compensate a candidate for a take-home exercise, that is a question for the employer's counsel before the trip.
What the officer sees
At the airport the officer asks the purpose of the visit, and the correct answer is the real one: "a job interview". A candidate who says "a holiday" and is found with an interview schedule in the bag has made a false statement to a federal officer, which is a more serious problem than the interview. It is reasonable to carry the invitation email and the return ticket.
An officer can decide that a pattern of trips for interviews looks like an attempt to live in the United States, and can refuse admission. This is rare for one interview, and more likely when someone has several trips in a few months.
If the job is offered
An offer does not let the person begin on the visitor's authorization. The employer files a petition for a work category such as H-1B or L-1, and the candidate usually needs to leave and enter again on the proper visa, or in some cases have a change of status approved while they are in the country. Changing status from a Visa Waiver admission is not available for most categories, so the practical path is a visa from a consulate abroad (CBP, Visa Waiver Program). A person who stays after the 90 days has no extension to ask for.
Who this does not apply to
A person who holds a B-1 visa has the same purposes, with a longer permitted stay that can be extended. A student or worker already in a status uses that status. A traveler from outside the program needs a visa regardless. Anyone unsure whether a planned visit involves work can ask an immigration attorney before booking.