The Ultimate Guide to Managing Cookies in Safari on Your Mac
As we spend more and more of our lives online, the trails of data we leave behind grow longer by the day. Among the most ubiquitous and potentially revealing of these data traces are browser cookies—small text files stored on our devices that allow websites to remember us and our preferences.
For Mac users wondering how to view and delete cookies in Safari, or whether to block cookies on Mac entirely, this in-depth guide has you covered. We‘ll explore what exactly cookies are, how they work in Safari, and how to adjust your settings for your optimal balance of privacy and convenience.
But first, let‘s establish why this matters. A staggering 97% of US websites use cookies, and the average site has 23 of them.1 While not all cookies are used for tracking, a significant portion are. A 2020 study found that 82% of websites contain third-party cookies from tracking domains.2
The prevalence of online tracking has only grown more controversial in recent years. "Cookies have been key to enabling a more tailored user experience since the early days of the web," says privacy researcher Alan Toner. "But as the internet has evolved, so has the scope of data collection. Many cookies now feed detailed user profiles that can feel more invasive than helpful."3
Thankfully, Safari provides robust options to view, remove and block cookies. Let‘s dive into the world of cookie management on your Mac.
Understanding Cookies: A Technical Overview
Before we get into the step-by-step of managing cookies in Safari, let‘s establish a more technical understanding of what cookies are and how they function.
A cookie is a small piece of data that a website asks your browser to store on your computer or mobile device. It contains information about your interaction with the site—your login credentials, preferences, shopping cart contents, and more—which the site can retrieve later to remember you.4
Safari stores cookies in a file called Cookies.binarycookies, located in the following directory on your Mac: ~/Library/Cookies. This file contains all the cookies from websites you‘ve visited in Safari, organized by domain.
Each individual cookie has a few key attributes:
- Name: The identifier for the cookie, like "session_id" or "user_token".
- Value: The actual data stored in the cookie, usually a unique identifier tied to your specific user profile on the site.
- Domain: The website that created the cookie and can access it. Only the originating domain can retrieve its own cookies.
- Expiration: The date when the cookie will be automatically deleted. Some cookies, called session cookies, expire when you close your browser. Others, called persistent cookies, can last indefinitely.
It‘s also crucial to understand the difference between first-party and third-party cookies:
- First-party cookies are set by the website you are visiting directly. If you go to nytimes.com, for example, any cookies set by that domain are first-party cookies.
- Third-party cookies are set by a domain other than the one you‘re visiting. If nytimes.com contains an ad from adservice.com, and that ad sets a cookie, that‘s a third-party cookie.
First-party cookies are generally used to provide essential site functions and remember your preferences. Third-party cookies, on the other hand, are mostly used for cross-site tracking and ad targeting. This is why many privacy advocates recommend blocking third-party cookies specifically.
The Benefits and Risks of Cookies in Safari
So why allow cookies in the first place? In short, because much of the modern web relies on them. Here are some of the key benefits of enabling cookies in Safari:
- Login and Authentication: Cookies are what allow websites to remember your login state, so you don‘t have to re-enter your credentials every time you visit. Without cookies, you‘d have to log in again on every page.
- Site Preferences: Many sites use cookies to remember your preferences, such as your language setting, location, or theme. This allows for a more seamless experience tailored to you.
- Shopping and Forms: Cookies enable handy features like remembering the items in your shopping cart between visits, or pre-filling forms with your name and address.
- Personalized Content: Cookies allow sites to surface content that‘s more relevant to you based on your past interactions. A news site might highlight articles similar to what you‘ve read before, for instance.
However, these benefits come with a big asterisk: privacy. The same cookies that power helpful customization can also be used to track your browsing behavior across the web. This is particularly true for third-party cookies.
Take the earlier example of an ad on nytimes.com setting a cookie. Now, say you visit a completely different site that also contains an ad from that same ad network. The ad network can access the cookie it previously set and know that the same browser visited both sites. Repeat this across dozens or hundreds of sites, and the ad network can build up a very detailed profile of your browsing history and inferred interests.
"This kind of cross-site tracking is incredibly common, but many users aren‘t aware of its full extent," says privacy advocate Michelle Richardson. "Cookies can enable digital fingerprinting techniques that follow you across the web, often for the purpose of targeted advertising. It‘s a level of surveillance that can feel alarming."5
Safari blocks most third-party cookies by default to mitigate these risks. But ultimately, the choice of whether to enable or disable cookies is a personal one that depends on your privacy preferences and trust in the sites you use.
How to Enable Cookies in Safari on Mac
Keeping in mind the balance of convenience and privacy, you may decide you‘re comfortable enabling cookies in Safari, at least for certain sites. Here‘s how:
Step 1: Open Safari preferences. You can do this by clicking Safari in the top menu bar, then clicking Preferences in the dropdown. Alternatively, use the keyboard shortcut Command + Comma.

Step 2: In the Preferences window, click the Privacy tab at the top.

Step 3: Next to "Cookies and website data," you‘ll see a few options. To allow both first-party and third-party cookies, select "Always allow."

If you want to allow cookies in most cases but block known trackers, choose "Allow from websites I visit." This allows first-party and some third-party cookies, but blocks those from known tracking companies as identified by Safari‘s Intelligent Tracking Prevention feature.
Step 4: Close the Preferences window. Your chosen cookie settings will now be applied.
Keep in mind that even if you allow all cookies, Safari will still automatically delete them after a certain period of time. You can adjust this timeframe in the "Remove history items" dropdown, ranging from manually to after one day, week, month, or year.
Viewing and Removing Cookies in Safari
Even if you enable cookies, it‘s a good idea to periodically check what sites are storing data on your computer and clear any that you don‘t recognize or no longer need. Here‘s how to view and delete cookies in Safari:
Step 1: Open Safari Preferences and go to the Privacy tab as outlined above.
Step 2: Click the Manage Website Data button. This will open a new window listing all websites that have stored cookies or other data on your Mac through Safari.

Step 3: To delete cookies from a specific site, click the site in the list and then click Remove. You can also remove all cookies at once with the Remove All button.

Keep in mind that removing a site‘s cookies will log you out if you were signed in, and may reset any saved preferences. But it will also wipe any tracking data that site had stored.
Step 4: When finished, click Done to close the window.
Alternatively, you can clear your entire browsing history and cookies in one fell swoop. Just go to Safari > Clear History in the top menu bar, select the desired timeframe, and click Clear History. This is a good nuclear option if you want a clean slate.
Blocking All Cookies in Safari
If you‘ve decided you don‘t want any websites storing cookies on your Mac, you can block them entirely in Safari with a single setting:
Step 1: Open Safari Preferences and navigate to the Privacy tab.
Step 2: Under "Cookies and website data," select "Always block." This will prevent any website from setting cookies.

Step 3: Click Block All in the confirmation window. This will also delete any existing cookies.
With this setting enabled, websites will not be able to set or access any cookies in Safari. This provides the maximum level of cookie-based privacy protection, but may cause some sites to function improperly. You may need to make exceptions for certain sites by clicking the Manage Website Data button and manually adding them.
Safari Cookie Settings in Context
It‘s worth noting how Safari‘s default cookie settings compare to other major web browsers. Safari is relatively unique in blocking all third-party cookies by default—both Chrome and Firefox allow them. However, Firefox has begun blocking third-party tracking cookies specifically, and Chrome plans to phase them out entirely by 2024.6
Where Safari really shines is its Intelligent Tracking Prevention (ITP) feature, introduced in 2017. ITP uses machine learning to identify and block cookies from known trackers, even if you have "Allow from websites I visit" enabled. It can also detect other covert tracking methods, like browser fingerprinting.7
While Chrome and Firefox have their own tracking protection measures, Safari‘s ITP is considered the most sophisticated and comprehensive. A 2021 study found that Safari blocked over 99% of third-party cookies, compared to under 90% for Chrome and Firefox.8
So in allowing third-party cookies by default, Safari strikes a balance between preserving site functionality and preventing intrusive tracking. But every user‘s privacy needs are different. The key is understanding the implications of each setting and choosing the configuration that works for you.
Cookies and Privacy: The Big Picture
While managing your Safari cookie settings is an important piece of the online privacy puzzle, it‘s just one piece. Cookies are far from the only way that websites and third parties can track your online behavior.
Other common tracking methods include:
- IP address tracking: Your IP address is like your computer‘s home address on the internet. Websites can log it to identify and locate you, even without cookies.
- Browser fingerprinting: Your browser sends a lot of information to websites you visit, like your device type, operating system, screen size, and more. Trackers can combine these details into a unique "fingerprint" to identify you across sites.
- URL tracking: URLs can contain unique identifiers that follow you as you click around the web, allowing sites to reconstruct your browsing path.
So while blocking cookies in Safari is a good start, it‘s not a privacy panacea. For more comprehensive protection, consider the following tips:
- Use a VPN to mask your IP address and encrypt your traffic
- Install browser extensions like Privacy Badger or uBlock Origin to block trackers
- Use private browsing mode to avoid saving your browsing history
- Opt out of ad personalization on major platforms like Google and Facebook
- Keep your browser and operating system updated to get the latest privacy features
The online data ecosystem is vast and complex, but every step you take to protect your digital footprint matters. By understanding how cookies work in Safari and adjusting your settings thoughtfully, you‘re well on your way to a more privacy-centric Mac browsing experience.