In Shanghai, as in the rest of Mandarin-speaking China, the standard way to say "thank you" is xièxie (谢谢), pronounced roughly like "shyeh-shyeh" with a falling-rising tone on the first syllable and a neutral tone on the second. You’ll hear it everywhere—from shop clerks and restaurant servers to taxi drivers and hotel staff.
For a slightly more formal or heartfelt expression, you can add nǐ (you): xièxie nǐ (谢谢您). In casual settings among friends, a simple xiè (谢) may suffice, but xièxie is universally appropriate and never out of place.
Mastering this one phrase will smooth countless daily interactions during your visit to Shanghai.