The first question you should ask yourself is if renting a car in Barcelona is a good idea. Generally, if you're visiting the city for a short trip and will be just exploring the city, you probably don't need to rent a car in Barcelona as public transport and taxis can take you where you need to go.
Can an American rent a car in Spain?
Documents needed to rent a car in SpainIn Spain, anyone whose residency has passed the six-month mark is expected to have an EU license, though you're usually not liable until your residency has passed two years. Spain is one of the countries that requires an IDP for car rentals.