344

I wish to view, add and edit the cookies of my google chrome. Can anyone suggest to me a way to do it?

kenorb
  • 24,736
  • 27
  • 129
  • 199
user67024
  • 3,549
  • 2
  • 15
  • 3
  • 21
    as the option changed in newer versions of Chrome, just right-click on page and choose Inspect (or press F12), go to Application tab and choose Cookies which is under Storage section: **`Right-Click: Inspect > Application tab > Storage > Cookies`** – S.Serpooshan Nov 12 '16 at 11:16

15 Answers15

306

You can go to the Developer Tools (Ctrl-Shift-J or Tools -> Developer Tools) -> Console and the you can enter javascript command:

document.cookie="keyofcookie=valueofcookie"

You can replace or add new cookies with this technique.

It is possible to set multiple cookie options, i.e.

document.cookie="username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/";
StanleyD
  • 3,196
  • 1
  • 12
  • 4
  • 9
    Stanley basically said it but to clarify - if you only edit a single cookie with this command, it will not delete all the other cookies on the site, it really only replaces the cookies mentioned in the command. – jrz Sep 11 '13 at 22:21
  • 44
    This won't work if some website is using `HttpOnly` flag to prevent access to cookies by JS (to deny XSS attacks). More on [wiki](http://en.wikipedia.org/wiki/HTTP_cookie#HttpOnly_cookie). – s3m3n May 06 '14 at 17:37
  • 1
    Typing in address bar works as well. – kenorb Sep 01 '15 at 16:57
  • You can also press F12 to open the dev tools, which is slightly quicker. – Gnuffo1 Sep 11 '15 at 09:26
  • 1
    @s3m3n If you want to change an `HttpOnly` cookie without using third party plugins, you can first use the **Resources** tab to delete the cookie, and then use `document.cookie` to create a new cookie. – kasperd Apr 05 '16 at 09:29
  • how to open developer tools on a mac? – gurghet Aug 20 '16 at 21:56
  • on Mac use cmd-option-i – John Henckel Sep 16 '16 at 14:38
  • @kenorb not in Chrome version 61 it doesn't - it performs a google search. – Matt Nov 19 '17 at 23:57
  • This also works in Safari – Andrew Feb 22 '19 at 02:13
121

Perhaps the easiest way to view your cookies in Chrome is to visit:

  • chrome://settings/cookies

This does not allow you to edit the cookies in Google Chrome 33.0.1750.117 (Official Build 252094) on Mac OS X, but does allow viewing and deleting.


Update (2017-08-08) [verified in 59.0.3071.115 (Official Build) (64-bit)]

In more recent versions, cookies are listed at:

  • chrome://settings/content/cookies

Update (2018-03-01) [Google Chrome 64.0.3282.167 (Official Build) (64-bit)]

To see the content you will need to select "See all cookies and site data" or follow...

  • chrome://settings/siteData
johnsyweb
  • 2,482
  • 1
  • 17
  • 17
  • 5
    There is no hyperlink, because Chrome does not allow hyperlinks for `chrome://`. – Martin Thoma Jun 07 '15 at 07:24
  • 2
    @moose Although Chrome does permit you to add these special links to Chrome's bookmarks for easy access (it also assigns a special "cog" favicon). I have this particular one on my bookmarks-bar for easy access. – MrWhite Oct 13 '15 at 12:09
  • @w3d It might work from the bookmakrs folder, but not on a webpage. Just try it: https://jsfiddle.net/egrLcmr1/ – Martin Thoma Oct 13 '15 at 12:28
  • 2
    @moose Yes. (Although Chrome used to allow you to _drag_ these special links to the address bar / omni box, but they stopped that as well - you just get the `about:blank` page now. You can still manually "Copy link address" and paste it in the address bar - marginally quicker than _selecting_, copy and paste.) – MrWhite Oct 13 '15 at 12:37
  • Well, that depends on your workflow. For me, clicking 3 times fast on the text and pressing CTRL+C is much faster than doing a right-click and selecting "copy link". – Martin Thoma Oct 13 '15 at 12:43
  • 1
    This should be the accepted answer. This is by far the easiest way to do it. – user1751825 Nov 16 '16 at 06:43
  • This method can't work on 59.0.3071.109 version – Daniel YC Lin Jun 23 '17 at 01:27
  • 4
    @Daniel: In Chrome 59, the new address is chrome://settings/content/cookies (You can find it by searching for "Cookies" in the search box at the top of the settings page.) – Ken Bloom Jun 30 '17 at 13:24
  • 5
    The location is changed. New location is **chrome://settings/content/cookies?search=cookie** – Sm Yamashita Jul 24 '17 at 07:54
  • If you go to chrome://settings/siteData it will bring up the cookies and site data page. – twasbrillig Feb 22 '18 at 18:12
  • This doesn't let you see the content of cookies, at least not any more. – felwithe Feb 26 '18 at 22:07
  • @felwithe updated answer – johnsyweb Mar 01 '18 at 03:08
  • chrome://settings/siteData?search=cookies – user237209 Aug 05 '18 at 20:21
  • Doesn't show any cookies for websites opened in Incognito mode. – izogfif Jan 15 '19 at 03:54
  • @izogfif try https://superuser.com/a/392638/37904 for incognito mode. – johnsyweb Jan 15 '19 at 08:09
  • @Johnsyweb as I wrote in a comment to identical answer: https://superuser.com/a/1354839/120788: It shows only cookies for domains related to the current tab, not **all** cookies. Very inconvenient when debugging pop-up sign-in windows like "login via Facebook" etc. – izogfif Jan 15 '19 at 10:20
64

Using 10.0.648.45 dev you can view cookies in Options → Under the Hood → Content Settings → All Cookies and site data.

Alternatively, you can view the cookies for the current site with the Developer Tools (F12, Ctrl-Shift-J or Settings (hamburger icon) More Tools → Developer tools), Application → Cookies.

Dan H
  • 2,104
  • 14
  • 15
  • 40
    But you cannot edit the values in either pane, can you? – phihag Dec 16 '12 at 08:45
  • 14
    That's correct, you can only view them in Chrome without addons. – Dan H Dec 27 '12 at 00:36
  • Note that viewing Resources > Cookies (in developer tools) just shows the cookies that are available to the current request. Whereas "All cookies and site data..." shows you all the cookies that have been set for a particular domain (regardless of the _path_). – MrWhite Oct 13 '15 at 12:13
  • @phihag And if cookie value too long, Developer Tools will trim it. – HEX Apr 21 '16 at 10:34
  • 2
    Under Application | Cookies in the newer version of Chrome (59), you can edit existing values and add new entries (by double clicking on the last row). – Kenston Choi Aug 04 '17 at 07:01
50

For the actual page

Recently it is changed from Resources to Application. So:

  1. Press F12
  2. Go to Application (tab) > Cookies (sidebar)
  3. Edit the existing cookies, or create a new one by double-clicking into an empty row.

Snapshot:

enter image description here

Louis Waweru
  • 23,945
  • 39
  • 132
  • 198
AKTanara
  • 601
  • 5
  • 3
33

I have been frustrated by the current solutions on the extensions store to view, edit, create, remove cookies. The current solutions appeared as popups and did not have a good UI. I wanted to get the same functionality as the firebug cookies editor with a Chrome look and feel. So I made one:

Cookie Inspector - Missing cookie manager for Google Chrome. Edit and create cookies right in the Developer Tools.

matan129
  • 1,940
  • 2
  • 18
  • 24
westoque
  • 520
  • 5
  • 5
  • Finally a decent replacement for Firecookie. Thank you man! – georg Oct 07 '13 at 10:13
  • Doesn't work with Chrome 42. Any other? – nitech May 27 '15 at 10:20
  • Hi @nitech. I'm on Chrome 43 and it's working pretty well. Maybe you can table what's not working in [support](https://chrome.google.com/webstore/detail/cookie-inspector/jgbbilmfbammlbbhmmgaagdkbkepnijn/support?hl=en). Thanks. – westoque May 28 '15 at 15:01
19

For all pages

  1. Go to Settings:

    enter image description here

    (now you are on chrome://settings/)

  2. Scroll to the Privacy section > Content Settings...

    enter image description here

    (now you are on chrome://settings/content)

  3. Click on All cookies and site data...

    enter image description here

    (now you are on chrome://settings/cookies)

  4. Here you can view/remove cookie or remove all cookies. Click on the labels to see details.

    enter image description here

For the actual page

  1. Press F12
  2. Go to Resources > Cookies

    enter image description here

  3. In the right side you can see the cookies. If you want to delete them > right click > Delete:

    enter image description here


To edit cookies, I recommend the Chrome plugin: EditThisCookie (https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg) that was already mentioned.

ROMANIA_engineer
  • 642
  • 9
  • 17
  • OK, and how to do it in the Incognito mode? `chrome://settings` is opened in non-Incognito window and It doesn't show me any cookies even though I have tons of tabs opened in the Incognito mode. – izogfif Jan 15 '19 at 03:54
  • Chrome is fine for viewing, and it looks like EditThisCookie gives wrong information and is malware/adware or at best, borderline adware https://superuser.com/questions/1430151/why-does-chromes-editthiscookie-extension-seem-to-list-some-cookies-as-sess/1430211#1430211 – barlop Apr 26 '19 at 22:56
13

There is a Chrome plug-in called Edit This Cookie. It adds a menu to your browser toolbar which allows you to add, edit, and delete cookies.

Install it from here: https://chrome.google.com/webstore/detail/edit-this-cookie/fngmhnnpilhplaeedifhccceomclgfbg

The source code is here: https://github.com/fcapano/Edit-This-Cookie

  • Just installed and seems like a good plugin. Plus it allows you to edit httpOnly cookies. Very handy. – Felix Eve Jun 09 '16 at 05:42
  • Chrome is fine for viewing, and it looks like EditThiscookie gives wrong information https://superuser.com/questions/1430151/why-does-chromes-editthiscookie-extension-seem-to-list-some-cookies-as-sess/1430211#1430211 – barlop Apr 26 '19 at 22:21
5

For completeness it should be noted that you don't need the developer tools console or any add-ons, extensions or plug-ins.

The javascript commands provided by @StanleyD can be directly entered into the address bar with just an additional "javascript:" prepended. E.g.

javascript:document.cookie="keyofcookie=valueofcookie"

This is useful in an environment where you need to send a cookie change out to a bunch of non-tech users without overwhelming them with steps.

Non person
  • 188
  • 2
  • 7
4

I would recommend use external cookies managers. Personally, I like ChromeCookiesView and CookieSpy.

ktapkin
  • 86
  • 1
2

If you just want to view all the cookies for the current page, without having to click on each one from the GUI, you can do this:

Open the developer console, and print the cookies for the current page by entering this in the console:

> document.cookie

See more at http://www.w3schools.com/js/js_cookies.asp

nealmcb
  • 574
  • 5
  • 12
1

On at least v59 of Google Chrome you can go to:

chrome://settings/content/cookies

carraua
  • 111
  • 4
1

There is plenty of extensions that can help with that. Here is a less known one that works well that I made. It is called Cookie-Editor.

Cookie-Editor is designed to have a simple to use interface that let you do most standard cookie operations. It is ideal for developing and testing web pages or even manual management of cookies for your privacy.

It let's you view all your cookies and edit or create new cookies. You can also delete your cookie and import/export them to a file.

It fits exactly what you were asking and I find it simpler to use than the built in tool since you can access it directly from the toolbar.

You can download it on the Chrome webstore: https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm

0

you can use this chrome extension: EditThisCookie https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=en

Moslem Hadi
  • 101
  • 2
  • 1
    this extension gives wrong information https://superuser.com/questions/1430151/why-does-chromes-editthiscookie-extension-seem-to-list-some-cookies-as-sess/1430211#1430211 and may also be adware – barlop Apr 26 '19 at 22:24
0

Nowadays you can use the Cookies pane of Chrome DevTools.

The feature has actually been available for quite a while:

Chrome 58 introduced the feature to edit cookies in DevTools.
Chrome 79 improved the display of long cookie values.
Chrome 81 updated the cookie editor to edit all fields.

Stefan Schmidt
  • 623
  • 5
  • 12
0

Try StorageAce chrome extension which provides cool UI to manage Cookies. It uses chrome.cookies API to query and modify cookies.

enter image description here

CodeZila
  • 103
  • 1
Mogli
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 28 '23 at 12:55
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/1191548) – Destroy666 May 28 '23 at 13:22