Cookie Clicker Cheat Codes: Every Working Code and Hack for 2026
Cookie clicker cheat codes give you a direct shortcut past hours of idle clicking infinite cookies, every upgrade unlocked, achievements on demand. The game was built by French developer Orteil (Julien Thiennot), and unusually for a game, it actually expects you to find these tricks. There are three ways to enter them: the browser developer console, the Steam console, and the bakery name method.
This guide covers all three, with every working code organised in scannable tables so you find what you need in seconds.
Quick Reference : Jump Straight to What You Need
| Your Goal | Best Cheat Code | Where to Enter |
| Add a massive cookie count instantly | Game.Earn(999999999); | Browser console |
| Unlock everything at once | Game.RuinTheFun(1); | Browser console |
| Get literally infinite cookies | Game.cookies=Infinity; | Browser console |
| Open the visual debug menu | YourName saysopensesame | Bakery name field |
| Auto-click the cookie for you | setInterval(function(){Game.ClickCookie()},10); | Browser console |
What Are Cheat Codes for Cookie Clicker and How Do They Work?
Cheat codes for cookie clicker are JavaScript commands you run directly inside the game’s environment. Cookie Clicker runs in a browser or in the Steam client, which uses the same web-based engine so it exposes a developer console that accepts live commands. When you type Game.Earn(1000000); and press Enter, the game processes that instruction the same way it handles any internal function call.
Two entry points exist. The first is the browser developer console, which works in Chrome, Firefox, Edge, and Safari. The second is the bakery name field, a built-in Easter egg Orteil left in the game that unlocks a visual debug menu without any coding. Both work on the current version (v2.052) and on Steam. Neither requires a mod, a download, or any third-party tool. Also explore cookie clicker hack for idle clicking infinite cookies .
How to Open the Console in Any Browser (Cookie Clicker Code Cheats)
The developer console is built into every major browser you don’t install anything. Here are the shortcuts.
| Browser | Windows / Linux | macOS |
| Google Chrome | Ctrl + Shift + J | Cmd + Option + J |
| Mozilla Firefox | Ctrl + Shift + K | Cmd + Option + K |
| Microsoft Edge | F12 → Console tab | F12 → Console tab |
| Safari | Cmd + Option + C (enable Develop menu in Preferences first) |
Once the panel opens, click the Console tab if it isn’t already selected. Type your cheat code at the blinking cursor and press Enter. A return value of undefined doesn’t mean the code failed that’s normal for commands that modify game state rather than return a value.

Save File Warning : Read This Before Using Any Cheat
Using Game.Earn() with an amount greater than your total all-time baked cookies, or using Game.RuinTheFun(1), will trigger the “Cheated cookies taste awful” shadow achievement and permanently mark your save. The mark shows in your stats menu and cannot be removed. If you want to keep a clean legitimate save, export it first: Options → Export Save → paste it into a text file. You can restore it any time by importing that string back.
How to Use Cheat Codes on Steam
Launch Cookie Clicker through Steam and press F12. The developer console opens directly no file editing required. Type your cheat code in the Console tab exactly as you would in a browser and press Enter. The bakery name method also works identically on Steam.
Steam Note: Older guides tell you to edit the local start.js file and change a DEV flag from 0 to 1. That step is no longer needed in the current Steam build. F12 opens the console immediately.
All Cookie Clicker Cheat Codes : Complete Console Command List
Every code below works in v2.052. Where you see <number> or <name>, replace that entire section including the angle brackets with your value. Commands are case-sensitive: Game.Earn works, game.earn does not.
| Cheat Code | What It Does | Category |
| Game.Earn(<number>); | Adds the specified number of cookies to your bank. Crucially, it does NOT increase “cookies baked all time,” making it the safest cheat for adding cookies without triggering the shadow achievement | Cookies |
| Game.cookies=<number>; | Sets your cookie bank to an exact number. This WILL flag your save if the number exceeds your all-time baked total | Cookies |
| Game.cookies=Infinity; | Sets cookies to infinite the number never decreases when you spend | Cookies |
| Game.cookiesPs=<number>; | Sets your cookies-per-second rate to a fixed value | Cookies |
| Game.RuinTheFun(1); | Unlocks almost everything at once all buildings, most upgrades, a massive cookie pile. The single most comprehensive cheat in the game | All-in-one |
| Game.SetAllAchievs(1); | Unlocks every achievement in your save file instantly | Achievements |
| Game.SetAllUpgrade(1); | Purchases all available upgrades instantly | Upgrades |
| Game.Win(‘<achievement name>’); | Unlocks a specific achievement by its exact in-game name. Example: Game.Win(‘Speed baking I’); | Achievements |
| Game.gainLumps(<number>); | Adds sugar lumps the premium resource used to level up buildings | Resources |
| Game.dragonLevel=<number>; | Sets the level of Krumblor, your cookie dragon (max level 20) | Mechanics |
| Game.santaLevel=<number>; | Sets Santa’s upgrade level during the Christmas seasonal event | Mechanics |
| Game.Ascend(1); | Triggers an ascension converts your cookies into Heavenly Chips and Prestige levels | Prestige |
| Game.Milk=<number>; | Sets your milk amount. Milk progress unlocks the kitten upgrade line, some of the strongest multipliers in the game | Resources |
| Game.popups=0; | Disables all pop-up notifications so the game runs silently | Utility |
| Game.bakeryName=”<name>”; | Changes your bakery’s display name via the console | Utility |

Auto-Clicker and Golden Cookie Cheat Commands
These two commands run as continuous processes rather than one-time actions.
To make the browser click the big cookie automatically every 10 milliseconds, paste this into the console:
setInterval(function(){Game.ClickCookie()}, 10);
You can adjust the number lower is faster, but going below 5 can slow your browser. To stop the auto-clicker, refresh the page.
To spawn a golden cookie on demand:
var newShimmer=new Game.shimmer(“golden”);
newShimmer.spawnLead=1;
Golden cookies disappear after a few seconds, so have your cursor ready.
To click every golden cookie automatically as soon as it appears:
setInterval(function(){Game.shimmers.forEach(function(s){if(s.type==”golden”)s.pop()})},500);
The Bakery Name Cheat: How saysopensesame Works
This is the only cheat built directly into the game’s standard interface no console required. Orteil added it as a debug tool, and it works on every platform where Cookie Clicker runs in a browser window, including Steam.
Here is how to activate it:
- Click your bakery’s name at the top left of the screen, just above your cookie count.
- Type a new name in this exact format: YourName saysopensesame for example, Baker saysopensesame.
- Press Enter. A small red dev tools button appears at the top-left of the game window.
- Click it to open the debug menu. From here you can add cookies, spawn golden cookies, and toggle upgrades visually without typing any console commands.
| Bakery Name Code | What Happens | Flags Save? |
| YourName saysopensesame | Unlocks the Open Sesame debug menu with full game controls | Yes immediately |
| Orteil | Grants the “God complex” shadow achievement. Applies a 1% CpS penalty until you rename the bakery | Yes |
| Ortiel (deliberate misspell) | Visual Easter egg cookie particles change to Orteil’s face. Applies a 2% CpS penalty | Yes |
Can You Use Cheat Codes on Cookie Clicker Mobile?
No. The mobile version of Cookie Clicker does not expose a developer console, so there is no way to enter commands. The bakery name trick also doesn’t trigger the debug menu on mobile.
Mobile Players: If you want to use cheat codes, open Cookie Clicker in a desktop browser at orteil.dashnet.org/cookieclicker it’s free to play and the full console works immediately. Progress is saved locally in your browser, so you can keep desktop and mobile saves separate.
Frequently Asked Questions
What is the cheat code for cookie clicker?Â
The single most useful cheat is Game.Earn(999999999); it adds a billion cookies to your bank without flagging your save with the shadow achievement. For an all-in-one unlock, Game.RuinTheFun(1); opens everything at once.
How do I open the console in Cookie Clicker?
In Chrome, press Ctrl + Shift + J on Windows or Cmd + Option + J on Mac. In Firefox, press Ctrl + Shift + K. In Edge, press F12. Click the Console tab, type your cheat, and press Enter.
Does cheating in Cookie Clicker disable achievements?Â
Cheating doesn’t remove achievements you’ve already earned, but it grants the “Cheated cookies taste awful” shadow achievement and marks your save permanently. Using Game.Earn() specifically avoids this flag it’s the safest cheat for adding cookies because it doesn’t alter your all-time baked count.
How do I get infinite cookies in Cookie Clicker?Â
Open the browser console and type Game.cookies=Infinity; then press Enter. Your cookie count becomes infinite and doesn’t decrease when you buy upgrades. This will flag your save.
What does saysopensesame do in Cookie Clicker?Â
It activates the game’s built-in debug menu. Rename your bakery to YourName saysopensesame and a red “dev tools” button appears in the top-left corner. Clicking it opens a visual panel where you can add cookies, spawn golden cookies, and toggle upgrades without typing any console commands.
Can I use cheats on Cookie Clicker mobile?Â
No. The mobile app doesn’t expose a developer console, so no cheat methods work on it. The bakery name method also doesn’t trigger the debug menu on mobile. Switch to the desktop browser version at orteil.dashnet.org/cookieclicker to access all cheats.
How do I use cheats on Cookie Clicker Steam?
Launch the game through Steam and press F12. The developer console opens immediately no file editing required. Type your cheat code in the Console tab and press Enter. The bakery name method works identically on Steam.
What is Game.RuinTheFun in Cookie Clicker?Â
Game.RuinTheFun(1); is the most comprehensive single cheat in the game. It grants an enormous cookie count and unlocks nearly all buildings, upgrades, and achievements at once. The downside: it permanently flags your save and awards the shadow achievement.
How do I unlock all achievements in Cookie Clicker?Â
Type Game.SetAllAchievs(1); in the browser console and press Enter. Every achievement in the game unlocks instantly. Alternatively, Game.RuinTheFun(1); unlocks most achievements as part of its all-in-one effect.
How do I spawn a golden cookie with a cheat?Â
Paste var newShimmer=new Game.shimmer(“golden”); newShimmer.spawnLead=1; into the console. A golden cookie appears on screen immediately. To click all golden cookies automatically as they appear, use the auto-shimmer loop from the auto-clicker section above.
About The Author
Hey, I’m Jody! I’m a web developer by profession and a passionate gamer from heart. Over the years, I’ve combined these two worlds by creating custom mods of mini web based games and tools to assist in those game so game's community members can enjoy enhanced user experience. Cookie Clicker Unblocked is also one of such project, created out of my love for the Cookie Clicker game.
I’ve released 7 versions to date, built dedicated cookie calculating tool, and even published a detailed guide to help players navigate the game like a pro. Let’s make gaming even more fun together!








