Access all stored cookies

dan picture dan · Feb 26, 2011 · Viewed 42.6k times · Source

I want to access my Chrome stored cookies from the JavaScript console. Is this possible?

Answer

ThiefMaster picture ThiefMaster · Feb 26, 2011

If you only need the cookies for the active site: Have a look at document.cookie. It contains semicolon-separated key=value pairs.

Edit: Note that due to security concerns you can't access cookies from a different domain. When you run something from the console, it's the equivalent of it running directly from the page, so since they don't want a spam site getting your Facebook credentials, you'll have to go to each website separately.