In Safari on a Mac, one checkbox controls cookies: Safari → Settings → Advanced → Block all cookies. Leave it deselected and websites can store cookies. Select it and no website can, and you will likely not be able to sign in anywhere.
If you want less tracking, you do not need that switch. Safari already keeps third-party cookies from following you between sites, and you can delete stored cookies at any time. Both are described below, together with the same setting on iPhone and iPad.
What cookies do
A cookie is a small piece of data that a website stores in your browser so it can recognize you on the next page or on your next visit. Cookies keep you signed in and remember things such as your settings. Cookies from other companies whose content is built into a page, called third-party cookies, can be used to track you from one website to another for advertising. Our guide to the types of cookies has more detail.
How to enable cookies in Safari on Mac
- Open Safari and choose Safari → Settings in the menu bar.
- Click Advanced.
- Deselect Block all cookies.
If the checkbox is not on the Advanced tab, look on the Privacy tab, where older Safari versions keep it. On macOS 12 Monterey and earlier the menu item is Safari → Preferences.
If a website still says that cookies are turned off, a content blocker extension may be the cause. Choose Safari → Settings → Websites → Content Blockers, set that website to Off and reload the page.
How to block all cookies in Safari on Mac
- Choose Safari → Settings and click Advanced.
- Select Block all cookies.
- Safari warns you that websites may not work. Click Block All to confirm.
What breaks when you block all cookies
The setting stops every website, including the one you are visiting, from storing cookies and other data on your Mac. Apple describes the effects in its support article about Safari cookies on iPhone, and they are the same on a Mac:
- You will likely not be able to sign in to a website, even with the correct user name and password.
- Some websites show a message that cookies are required or that cookies are turned off in your browser.
- Some features of a website stop working.
Anything a website has to remember from one page to the next is affected. A shopping cart may empty itself, and a cookie banner usually comes back on every visit, because the site has nowhere to store your answer. Blocking all cookies is fine for a short test. For everyday browsing, the next three options reduce tracking and keep websites working.
Block only the cookies that track you
Choose Safari → Settings → Privacy and make sure Prevent cross-site tracking is selected. Apple says Safari blocks third-party cookies from tracking you by default. With this option on, Safari also periodically deletes tracking data from third-party content providers, except for the ones you visit yourself. The protection is designed to stop trackers while websites keep working normally.
To see which trackers were blocked, choose Safari → Privacy Report.
Delete cookies that are already stored
- Choose Safari → Settings and click Privacy.
- Click Manage Website Data. The list shows every website that has stored cookies or other data on your Mac.
- Select one or more websites and click Remove, or click Remove All.
Removing the data may sign you out of those websites. Apple also notes that it may change or remove the same data in other apps.
Keep cookies for one session only
A private window is the middle way. Websites get the cookies they need while you browse, and the changes are not saved afterward. Choose File → New Private Window or press Shift-Command-N. You sign in again next time, and the cookies from that session do not stay on your Mac. See how private browsing works on a Mac.
Kingpin, our private browser for Mac, works this way all the time. It blocks third-party cookies and keeps the rest in memory only, never on disk, so they are gone when you quit. The trade-off is the same as with a private window: you sign in again each time you open the browser, and Kingpin does not save website passwords.
Cookies in Safari on iPhone and iPad
- Open the Settings app, tap Apps, then tap Safari.
- Tap Advanced.
- Turn Block All Cookies off to enable cookies, or on to block them.
On iPhone, turning the option on asks you to confirm with Block All and removes all existing cookies and website data. To delete stored cookies without blocking new ones, go to Settings → Apps → Safari → Advanced → Website Data and tap Remove All Website Data.