344

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

1
  • 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 Nov 12, 2016 at 11:16

15 Answers 15

307

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=/";
9
  • 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, 2013 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.
    – s3m3n
    May 6, 2014 at 17:37
  • 1
    Typing in address bar works as well.
    – kenorb
    Sep 1, 2015 at 16:57
  • You can also press F12 to open the dev tools, which is slightly quicker.
    – Gnuffo1
    Sep 11, 2015 at 9: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 5, 2016 at 9:29
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
16
  • 5
    There is no hyperlink, because Chrome does not allow hyperlinks for chrome://. Jun 7, 2015 at 7: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, 2015 at 12:09
  • 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, 2015 at 12:37
  • 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, 2017 at 13:24
  • 5
    The location is changed. New location is chrome://settings/content/cookies?search=cookie Jul 24, 2017 at 7:54
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.

5
  • 40
    But you cannot edit the values in either pane, can you?
    – phihag
    Dec 16, 2012 at 8:45
  • 14
    That's correct, you can only view them in Chrome without addons.
    – Dan H
    Dec 27, 2012 at 0: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, 2015 at 12:13
  • @phihag And if cookie value too long, Developer Tools will trim it.
    – HEX
    Apr 21, 2016 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). Aug 4, 2017 at 7:01
51

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

2
  • 2
    This is the best and the easiest way!
    – nick722
    May 12, 2022 at 9:59
  • Thank you! I find this the only way to actually get to cookies and their values in Chrome 121.
    – edison23
    Feb 16 at 21:13
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.

3
  • Finally a decent replacement for Firecookie. Thank you man!
    – georg
    Oct 7, 2013 at 10:13
  • Doesn't work with Chrome 42. Any other?
    – nitech
    May 27, 2015 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. Thanks.
    – westoque
    May 28, 2015 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.

2
  • 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, 2019 at 3:54
  • Chrome is fine for viewing, and it looks like EditThisCookie gives wrong information and is malware/adware or at best, borderline adware superuser.com/questions/1430151/…
    – barlop
    Apr 26, 2019 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

2
  • Just installed and seems like a good plugin. Plus it allows you to edit httpOnly cookies. Very handy.
    – Felix Eve
    Jun 9, 2016 at 5:42
  • Chrome is fine for viewing, and it looks like EditThiscookie gives wrong information superuser.com/questions/1430151/…
    – barlop
    Apr 26, 2019 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.

1
  • 3
    This doesn't work if HttpOnly has been used.
    – Flimm
    Jan 13, 2016 at 13:50
4

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

1
  • 7
    FYI, CookieSpy is AdWare Apr 8, 2013 at 15:19
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

1

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

chrome://settings/content/cookies

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
1

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.

0

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

1
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

2
  • 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.
    – Community Bot
    May 28, 2023 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
    – Destroy666
    May 28, 2023 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .