Access all stored cookies

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

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.

Easiest way to go:


Using Chrome, if you have the possibility to use other tool instead of only the Console, you can access all stored cookies and see detailed information using the tab “Resources”. To do this:

  • Open Developer Tools (F12)
  • Click on “Resources” tab
  • Expand the “Cookies” list item
  • Click on the website address

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .
Read More:   Is defining every variable at the top always the best approach?

Similar Posts