12 hours and you're contemplating spending it all in the airport? Of COURSE you should go and check out the city, there is lots to see! It's one of the definitive Asian metropolises.
It's also very achievable in a much shorter layover, let alone 12 hours. The maglev monorail is a cool experience, and connects to the very easy to navigate subway system. At the very least go and wander along the Bund and enjoy the spectacle.