User interface (UI) is to user experience (UX) what the car is to driving it.
So one designs user interfaces to bring out the most satisfying user experience.
User experience is unique
But experience is in the mind. Since not everybody has the same mind, each “experiencer” therefore experiences a unique experience.
Designer Alan Blood nails it when he says “designers have no way of ‘designing an experience’ for someone else.”
What you are designing, strictly speaking, are interactions—praying that the interactions would produce a satisfying experience, not possible 100 percent of the time of course.
Common Usage
But when most people talk of “user interface” and “user experience,” they mean computers and electronic gadgets—the design of things that get displayed in computers and tablets and game consoles and media player devices and cellphones so the user can manipulate the device to achieve an outcome—write a document, create or play music or video, play games, etc.
The displayed menu and graphical elements are the UI and making their use effective, efficient and satisfactory is the goal of “UX design.” UI and UX can also refer to things outside of computerized devices—architecture, or industrial design or library science, for example.
Don’t judge a book by its UI
Printed words on sheets of paper bound by leather, for example, is a kind of user interface. The pleasure you get from reading a book is the aim of user experience design. But no well-designed book can compensate for poor content.
So, can we say that the author’s intent is UX design? Partly. Because the author might intend for the reader to experience joy or indignation from reading his or her writing. This intention can be called “design”.
UX design aims to deliver this intent in the best way possible (that is, the best interaction possible). But it’s not really experience design, only interaction design. The words in the book are just a means to achieve a reaction/interaction.
Again, in reality, one can only design interactions that hopefully create a good experience most of the time, not design the experience itself. So there’s really no such thing as UX design, only UI design intended for the best interaction.
Back to Alan Blood (and getting philosophical):
“So, please, let’s let go of the fantasy of the fictitious role of User Experience (aka ‘UX’) Designer. It doesn’t exist. It never did. Not even God can design user experiences so long as one accepts that He’s also given each of us agency.”
So, when someone asks you for the difference between user interface design and user experience design, think of the car. It might have been designed or not but your interaction with it, producing a pleasant or unpleasant experience, is far from being “designed.”

