AS Americans, we like to imagine our country as we think of ourselves: open-hearted and welcoming; efficient and practical; easygoing, above all. These values are the foundation of our culture, of an open economy fueled by ideas and immigration, and of our soft power — America’s ability to change the world simply because it is admired.

Whatever foreigners think of the American experiment, though, it’s unlikely the experience of crossing our border has made them think better of it.

Imagine that you’re the citizen of a prosperous, democratic ally like Britain, Spain or Japan, and you’d like to visit America. Before traveling, you must pay $14 to complete an online United States government form called ESTA, short for Electronic System for Travel Authorization.

ESTA asks for basic personal data, like your name and birth date. It also asks whether you are guilty of “moral turpitude,” whether you’re planning crimes or “immoral activities” and whether you suffer from “lymphogranuloma venereum” (don’t ask). If you’re involved in terrorism or genocide — and for some reason you’ve decided to take this opportunity to inform the United States government — there’s a box for that. And if you’re a spy — a particularly artless one — please let us know.