Nowadays, nationalism has a strong negative connotation attached to it. This stigma doesn't apply to patriotism.
What's the difference between them?
If there is a difference to what extent could nationalism be a positive force for good?
George Orwell in 'Notes on Nationalism' said it best I think,
By ‘nationalism’ I mean first of all the habit of assuming that human beings can be classified like insects and that whole blocks of millions or tens of millions of people can be confidently labelled ‘good’ or ‘bad’. But secondly — and this is much more important — I mean the habit of identifying oneself with a single nation or other unit, placing it beyond good and evil and recognising no other duty than that of advancing its interests. Nationalism is not to be confused with patriotism. Both words are normally used in so vague a way that any definition is liable to be challenged, but one must draw a distinction between them, since two different and even opposing ideas are involved. By ‘patriotism’ I mean devotion to a particular place and a particular way of life, which one believes to be the best in the world but has no wish to force on other people. Patriotism is of its nature defensive, both militarily and culturally. Nationalism, on the other hand, is inseparable from the desire for power. The abiding purpose of every nationalist is to secure more power and more prestige, not for himself but for the nation or other unit in which he has chosen to sink his own individuality.
Nationalism: I should do what is best for my country even at the cost of other countries. Nationalists sacrifice others. Nationalists also tend to believe in a zero-sum world. In order for their situation to improve, that of someone else must worsen.
Patriotism: I should do what is best for my country even at the cost of myself. Patriots sacrifice what is theirs.
While the two start similarly, they end up at very different places. Of course, they also are often used as synonyms, sometimes incorrectly.
Below is a summary of some key differences, based on the Nationalism and Patriotism articles on the Stanford Encyclopedia of Philosophy. I'll use examples from American politics for my own convenience.
One of the classical distinctions is the difference between the nation and state. The nation is a primordial ethnic or social category, while the state is a formal political organization. In today's world we typically assume the two are connected, but in the past the two were independent. For example, today a person is a citizen of the United States and perceives themselves to be a member of a cohesive social unit - "Americans".
In the past, a person may have been a citizen or subject to a leader, but would have identified themselves based on their ethnicity, clan, etc. The idea of "belonging to" a state didn't make sense, except as a legal term.
In this sense, "patriotism" is an affinity for your state and "nationalism" is an affinity for your nation. When Americans support American military campaigns they are generally acting as patriots by supporting the victory of our state over our state's enemies. Nationalist support is more varied: some Americans support having Christian prayer in schools on the basis of a perceived Christian-American national identity. Other Americans would consider freedom of religion to be an important part of our cultural identity.
This definition is most useful when a single state is not homogeneous: it has a variety of different cultures which prevent the "nation" from syncing with the "state".
Patriots and nationalists have different concepts of self-determination.
Nationalists desire to enhance their national identity. They often will pursue politics as a means to do this. In many formulations, the existence of a nation-state is the ideal outcome. For example, Algerian nationalists in the the 1950s pursued a war with France for independence and the opportunity to create a socially-Algerian Algeria, free of French control. On a less dramatic scale, the Religious Right in America uses the state to pursue their own social and cultural goals. In their view, the state should (ideally) mirror their nation's views.
Patriots are not interested in the self-determination of ethnic or cultural groups. On the contrary, in pursuit of the self-determination of their state they may be happy to curtail the interests of social groups. For example, enhanced policing of rebellious areas strengthens the state at the expense of the groups being policed. They might encourage the military to act in a situation which benefits their state, but which harms the nations they will be involved with abroad.
Patriots and nationalists justify their belief differently. Patriots will justify patriotism on the basis of all the positive aspects of their state (a kind of catalog of virtues). Nationalists justify nationalism on the basis of identity, "it's who we are".
There are many arguments in favor of there being no real difference at all. To summarize:
From a linguistic perspective I would say in most cultures Nationalism carries the connotations of attacking, aggression, dividing, hate etc.
Whereas, Patriotism carries the connotation of defending, helping, uniting, (nostalgic) kindness etc.
Generally, I would say there are no differences between these words. But where come the different connotations from?
Speaking with Foucault there are products of the (cultural) discourse. This discourse is formed by aspects of the language, institutions and performative utterance.