The Cookie Inspector bookmarklet is a powerful tool for web developers to inspect and analyze cookies on any webpage. This tool provides detailed information about all cookies associated with the current domain, helping developers understand and debug cookie-related issues.
javascript:!function(){function n(n){const t=document.cookie.split(";");for(let o of t)if(o.trim().startsWith(n+"=")){const n=o.match(/expires=([^;]+)/);if(n)return new Date(n[1]).toLocaleString()}return"Session Cookie"}const t=document.createElement("div");t.style.cssText="\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: white;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n z-index: 10000;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n min-width: 400px;\n max-width: 90vw;\n max-height: 90vh;\n overflow-y: auto;\n ";const o=document.cookie.split(";").map((t=>{const[o,e]=t.trim().split("=");return{name:decodeURIComponent(o),value:decodeURIComponent(e||""),domain:window.location.hostname,path:"/",expires:n(o)}}));t.innerHTML=`\n <div style="margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;">\n <h3 style="margin: 0;">Cookie Inspector</h3>\n <button onclick="this.parentElement.parentElement.remove()" \n style="background: none; border: none; font-size: 20px; cursor: pointer;">×</button>\n </div>\n <div style="margin-bottom: 15px;">\n <p style="margin: 0;">Domain: <strong>${window.location.hostname}</strong></p>\n <p style="margin: 5px 0 0 0;">Total Cookies: <strong>${o.length}</strong></p>\n </div>\n <div style="margin-bottom: 15px;">\n <input type="text" id="cookieSearch" \n placeholder="Search cookies..." \n style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px;">\n </div>\n <div id="cookieList" style="max-height: 400px; overflow-y: auto;">\n ${o.map((n=>`\n <div style="margin-bottom: 10px; padding: 10px; background: #f5f5f5; border-radius: 4px;">\n <div style="margin-bottom: 5px;">\n <strong>Name:</strong> ${n.name}\n </div>\n <div style="margin-bottom: 5px;">\n <strong>Value:</strong> ${n.value.length>50?n.value.substring(0,50)+"...":n.value}\n </div>\n <div style="margin-bottom: 5px;">\n <strong>Domain:</strong> ${n.domain}\n </div>\n <div style="margin-bottom: 5px;">\n <strong>Path:</strong> ${n.path}\n </div>\n <div>\n <strong>Expires:</strong> ${n.expires}\n </div>\n </div>\n `)).join("")}\n </div>\n `;const e=t.querySelector("#cookieSearch"),i=t.querySelector("#cookieList");e.addEventListener("input",(function(){const n=this.value.toLowerCase(),t=i.children;Array.from(t).forEach((t=>{const o=t.textContent.toLowerCase();t.style.display=o.includes(n)?"block":"none"}))})),document.body.appendChild(t)}();
Drag me to bookmark bar: 👉🏻 Cookie Inspector
- Lists all cookies for the current domain
- Shows cookie name, value, domain, and expiration
- Provides search functionality for cookies
- Displays total cookie count
- Simple to use with a single click
Why Use Cookie Inspector? #
The Cookie Inspector bookmarklet is essential for developers who need to:
- Debug cookie-related issues
- Verify cookie settings and values
- Monitor cookie expiration dates
- Understand cookie usage patterns
- Ensure proper cookie implementation
Features #
Comprehensive Cookie Information
- Cookie name and value
- Domain and path details
- Expiration date/time
- Total cookie count
Search Functionality
- Real-time cookie search
- Filter by name or value
- Easy to find specific cookies
- Case-insensitive search
User-Friendly Interface
- Clean, modern design
- Scrollable cookie list
- Truncated long values
- Easy to close popup
Detailed Cookie Properties
- Full cookie details
- Formatted expiration dates
- Domain information
- Path information
How to Use #
- Click the bookmarklet to activate the tool
- View the list of all cookies for the current domain
- Use the search box to filter cookies
- Review cookie details including:
- Name and value
- Domain and path
- Expiration date
- Close the popup when done
Best Practices #
- Use this tool to verify cookie settings
- Check cookie expiration dates
- Monitor cookie usage patterns
- Debug cookie-related issues
- Ensure proper cookie implementation
- Previous: Color Picker
- Next: CSS Class Inspector