Cookie Clicker's cheats aren't button combos. They're short JavaScript commands you paste into your browser's developer console, plus a built-in debug panel called Open Sesame that opens a whole cheat control surface at once.

The thing we'd sort out first is which version you're playing. On the free browser game, cheating costs you nothing real, because achievements there only feed your milk bonus and bragging rights. The single mark it leaves is a shadow achievement called "Cheated cookies taste awful", and you can remove that one yourself.

Steam is the version to treat carefully. It tracks real Steam achievements, and cheating there needs manual cleanup afterward to undo. Every command below is case-sensitive, so type it exactly as written.

The list is grouped by what each command does.

Every cheat command, by category

The commands are grouped by what they change, starting with the core cookie output.

Cookies, production, and sugar lumps

Cheat What it does Command
Set your cookie bank Overwrites the cookies in your bank to any number you pick Game.cookies = <amount>;
Give yourself infinite cookies Sets the bank to literal Infinity, so nothing is ever too expensive to buy Game.cookies = Infinity;
Add cookies without overwriting the total Adds a set amount on top of what you already have Game.Earn(<amount>);
Set cookies per second Forces your production rate to a chosen value Game.cookiesPs = <amount>;
Set sugar lumps Sets your current sugar lump count to a chosen number Game.lumps = <amount>;

Two quirks worth knowing here. The infinite-cookies command can leave the on-screen number stuck showing infinity even after a reset, so clear the display with Game.cookies = 0;. And the cookies-per-second override self-corrects on your next building or upgrade purchase unless you pair it with a persistent hook.

One more warning: setting your bank higher than your lifetime cookies baked is what triggers the "Cheated cookies taste awful" shadow achievement. Game.Earn(<amount>); sidesteps that by keeping lifetime tracking consistent with the amount you add.

Upgrades

Cheat What it does Command
Unlock one upgrade Unlocks a named upgrade in the store without buying it Game.Unlock("<upgrade name>");
Unlock and instantly buy an upgrade Unlocks a named upgrade and marks it as purchased in one step Game.Upgrades["<upgrade name>"].earn();

Both accept an ID instead of a name if you'd rather not match capitalization exactly. Use Game.Unlock(Game.UpgradesById[<ID>].name) for the first, and Game.UpgradesById[<ID>].earn(); for the second.

Achievements, dragon, and Santa

Cheat What it does Command
Unlock one achievement Grants a named achievement immediately Game.Win("<achievement name>");
Unlock every achievement Grants the full list, shadow achievements included, in one line Game.AchievementsById.forEach(function(e){ Game.Win(e.name); });
Remove a specific achievement Revokes a named achievement, so you can undo an accidental unlock Game.Achievements["<achievement name>"].won = 0;
Set your dragon level Sets the Dragon's training level directly, unlocking its trained auras Game.dragonLevel = <level>;
Set your Santa level Sets the Christmas-season Santa tier directly Game.santaLevel = <level>;

The achievement name has to match in-game capitalization exactly, or you can target by ID with Game.AchievementsById[<ID>].name. The wiki also lists a shorthand alias, Game.SetAllAchievs(1);, that grants everything.

The remove command is the one players lean on most, usually to strip "Cheated cookies taste awful" after testing other cheats. It doesn't lower your milk percentage. Santa level only matters during the in-game Christmas season, so setting it out of season does nothing visible.

God mode and utilities

Cheat What it does Command
God-mode shortcut Grants every upgrade including debug ones, grants every achievement, starts the Grandmapocalypse, and sets your bank to one nonillion cookies Game.RuinTheFun();
Spawn a golden cookie Spawns a clickable golden cookie shimmer on demand var newShimmer = new Game.shimmer("golden");
Auto-click the big cookie Clicks the big cookie on a repeating timer at an interval you set in milliseconds window.autoClicker = setInterval(function(){ Game.ClickCookie(); Game.lastClick = (new Date().getTime()) - (1000/50); }, <milliseconds>);
Change the frame rate Changes animation frames per second, which also speeds up or slows buff timers and golden cookie spawns Game.fps = <value>;

Game.RuinTheFun(); is the command we'd reach for if you just want the whole game opened in one shot. It's built into the game's own code as a one-shot maximal cheat, separate from the Open Sesame panel below.

The golden cookie spawn uses the same shimmer code as wrath cookies, so the same command family covers both. Stop the auto-clicker with clearInterval(window.autoClicker); when you're done. Frame rate defaults to 30, so doubling it to 60 roughly doubles animation and timer speed.

How to enter these commands

How you open the console depends on which version you're playing.

On the browser version

Open your browser's developer console first. In Chrome or Edge, press F12, or Ctrl+Shift+I (Cmd+Option+I on Mac), or right-click the page and choose Inspect, then click the Console tab. In Firefox, use Ctrl+Shift+K (Cmd+Option+K on Mac).

Click into the console's input line, type or paste a command exactly as documented, and press Enter to run it. Case matters, so Game.cookies and game.cookies are not the same thing. The Minecraft cheats and commands are similarly case-sensitive once you open the chat console.

On the Steam version

The console is switched off by default on Steam. You have to edit the game's local start.js file first. Find it under the game's install folder at resources/app/start.js, change the line let DEV=0 to let DEV=1, save the file, and relaunch the game. After that, Ctrl+Shift+I opens the same console you'd use on the web. The Stardew Valley cheats work through save edits and chat commands in a similar spirit.

The Open Sesame cheat menu

Open Sesame is the game's built-in debug and cheat panel, and it's the part most "cookie clicker cheats opensesame" searches are really after. On the browser version you can trigger it two ways.

Run Game.OpenSesame(); in the console, or go to Options and rename your bakery so the name ends with the unbroken text saysopensesame. A bakery named "My Bakery" becomes "My Bakerysaysopensesame", and that opens the same panel with no console at all. This is the in-game bakery-name field in Options, not the save-import box, which is the detail most old guides get wrong.

Once it's open, the panel gives you a lot at once:

  • Spawn golden cookies with custom effects such as frenzy, click frenzy, cookie storm, and lucky.
  • Toggle 11 debug upgrades, including Ultrascience for 5-second research, Gold hoard for near-constant golden cookies, Neuromancy to switch any upgrade or achievement on and off, Magic shenanigans for 1000x production, Occult obstruction to zero out production, Perfect idling for offline production, and Turbo-charged soil for instant garden growth.
  • Bulk-buy or bulk-sell buildings in one action.
  • Multiply or divide your cookie count or your heavenly chips by a set factor.

Here's the catch. Opening the panel awards the "Cheated cookies taste awful" shadow achievement even if you never touch a single feature. You can remove it afterward with Game.Achievements["Cheated cookies taste awful"].won = 0;. To leave debug mode on the browser version, delete the saysopensesame text from your bakery name, save, and reload the page.

The bakery-name trick is web-only. On the Steam release it does nothing, so the panel is reachable there only through the console after you flip the DEV flag in start.js and run Game.OpenSesame();.

What cheating does to your achievements

On the free browser version, there's no external stake. Achievements only move your milk progress and your bragging rights, so console commands or Open Sesame carry no real penalty beyond that one cosmetic shadow achievement, which you can toggle back off. If you like the idle loop, our best idle mobile games list has more to sink time into.

Steam is where it gets fiddly, because it tracks real Steam achievements. Steam Community guides describe the mechanism in three parts:

  • The bakery-name Open Sesame trick doesn't function on Steam, so cheating there means editing start.js to flip the DEV flag from 0 to 1 before the console even opens.
  • The game ships with logic that keeps a cheated save from awarding real Steam achievements while that DEV flag is active.
  • Importing a browser save into Steam after using bulk achievement-unlock commands can leave shadow flags on the save, such as "Cheated cookies taste awful" or "Third-party", that make Steam disregard it for achievement purposes until you clear them.

So cheating on Steam doesn't automatically and permanently lock you out. It just takes extra manual cleanup to get Steam to honor achievements again: revert the DEV flag, then clear the cheat-flag achievements. That said, this exact mechanism comes from two independent Steam Community guides rather than an official Playsaurus or Orteil statement, so treat the precise trigger conditions as community-reported rather than officially confirmed.

If you just want the whole game opened in one go, Game.RuinTheFun(); is the fastest single command, since it grants every upgrade and achievement and drops a nonillion cookies in your bank. If you'd rather keep control, open the Open Sesame panel and switch on only the debug upgrades you actually want.

Play games and earn real cash with HeyCash

On browser, we'd keep a separate bakery name or save for cheat runs, since the shadow achievement is the only thing you'd want to scrub afterward. On Steam, decide before you start, because the cleanup is more work than the cheating. The Retro Bowl cheats are another case where the real levers are game features, not typed codes.

No. The method that actually works is adding the unbroken text saysopensesame to the end of your bakery name in Options, or running Game.OpenSesame(); in the console. Typing a word into the save-import field does nothing.
Yes. Run Game.cookies = Infinity; in the browser console. The counter can get stuck showing infinity after a reset, so clear it with Game.cookies = 0;.
On the free browser version, achievements have no external consequence, so cheating only costs you a shadow achievement you can remove. On Steam, cheating interacts with the Steamworks achievement code and can block or flag unlocks until you revert the file edit that enabled the console and clear the cheat-flag achievements.
No. Per the Fandom wiki and Steam Community guides, that trick is web-only. On Steam you edit start.js to enable the console with DEV=1, then run Game.OpenSesame();.

Get paid to play games you'd happily play for free

HeyCash makes gaming more than just entertainment. Instead of just pixels, you earn points than turn into real-world cash you can collect through PayPal. Free to use, and some reward options start at $1.

Share this with your friends