How to Cheat in Cookie Clicker: Codes, Safe Limits and What Actually Breaks
Once you have the developer console open, the real question is which cheat code to run and how far you can push it before the game breaks. This guide covers every working cheat code organized by goal, explains the safe number ceiling, and tells you exactly which commands corrupt your save.
Why Cheats Work in Cookie Clicker: The JavaScript Reason
Cookie Clicker is built entirely in JavaScript and runs inside your browser tab. Every value in the game, including your cookie count, cookies per second, upgrade states, and sugar lumps, is a live JavaScript variable stored in your current browser session.
Your browser’s developer console has direct read and write access to those variables. When you type Game.cookies += 1000000000; you are not injecting anything foreign. You are using the same interface the developer used to build and test the game.
Orteil, the original developer, confirmed this by building Open Sesame into the game itself. The debug panel exists because the game was designed to be inspectable. That is why no third-party software is needed and why cheats carry no virus or malware risk when used on the official site at orteil.dashnet.org.
For how to open the console or activate Open Sesame, see the full Cookie Clicker hack guide.
How to Get Cheats in Cookie Clicker: Choosing the Right Method First
Before running any command, pick your approach based on how much control you want.
| Approach | Best For | Access Needed |
| Single console command | One specific boost | Browser console open |
| Open Sesame panel | Point-and-click, no typing | saysopensesame in bakery name |
| Autoclicker script | Passive clicking without full cheating | Browser console open |
| Game.RuinTheFun(1) | Everything at once, no going back | Browser console open |
Every method triggers the Shadow Achievement “Cheated cookies taste awful” except the autoclicker script and the cookie duplication command covered below. Export your save through Options before running anything. One wrong command has no undo.
Cookie Clicker Cheat Codes Organized by Goal
Most guides dump every command in one unordered list. This section groups them by what you actually want so you can copy exactly what you need.
Add cookies and set production rate:
Game.cookies += 1000000000;
// adds 1 billion cookies to your balance
Game.cookiesEarned += 1000000000;
// adds to your all-time baked total
// required to unlock certain milestone achievements
Game.cookiesPs = 100000;
// sets cookies per second to 100,000
Game.computedMouseCps = 5000;
// sets the value of each manual click to 5,000 cookies
Adding to Game.cookiesEarned matters. Many achievements and prestige thresholds check your lifetime baked count, not your current balance. If you only add to Game.cookies those milestones will not trigger.
Unlock upgrades and achievements selectively:
Game.SetAllUpgrade(1);
// unlocks every upgrade in the game without touching achievements
Game.SetAllAchievs(1);
// unlocks all achievements including shadow achievements
Game.Win(‘Neverclick’);
// unlocks one specific achievement by exact name
// replace Neverclick with any achievement name
Unlock everything in one command:
Game.RuinTheFun(1);
// grants every upgrade, every achievement, and 1 nonillion cookies
// this is irreversible during the current session
// do not use this if you plan to continue a legitimate run afterward
Sugar lumps, Krumblor and Santa:
Game.gainLumps(10);
// adds 10 sugar lumps to your total
Game.dragonLevel = 10;
// sets Krumblor the dragon to level 10
Game.santaLevel = 14;
// maxes out all Santa upgrades instantly
Save and session management:
Game.loadSave();
// reloads your save so recent changes register correctly
// run this after any command that changes a stat
Game.WriteSave();
// force-saves the current game state to your browser storage
How to Activate Cheats in Cookie Clicker Without Touching Achievements
Two cheat methods leave your achievement record clean. Every other method triggers “Cheated cookies taste awful” the moment the console or Open Sesame panel opens.
Method 1: Cookie duplication command
Game.cookiesEarned += Game.cookies;
Game.cookies *= 2;
This doubles your current cookie balance and adds the same amount to your lifetime total. It bypasses the detection condition in the game’s code that normally triggers the shadow achievement when you add cookies directly. Run it multiple times to compound the effect.
Method 2: Autoclicker script
var autoClick = setInterval(function(){
Game.ClickCookie();
}, 17);
This clicks the big cookie once every 17 milliseconds, which equals roughly 60 clicks per second. The game treats every click as a legitimate player action. No cheat flag is triggered and no shadow achievement is awarded.
To stop it, paste this into the console and press Enter:
clearInterval(autoClick);
The autoclicker is the least disruptive cheat available. It preserves upgrade costs, building prices, and the incremental feel of the game while removing the repetitive manual clicking.
How to Unlock Cheats in Cookie Clicker Safely: The Number Ceiling
This is the section every other guide skips. There is a hard mathematical ceiling above which Cookie Clicker’s cheat commands start corrupting your session rather than helping it.
The JavaScript safe integer limit is 9,007,199,254,740,991 (roughly 9 quadrillion).
Cookie Clicker performs cost calculations using JavaScript’s standard number format. When you enter a value above the safe integer ceiling, JavaScript cannot represent it precisely. The game receives a rounded or incorrect value. This produces three specific bugs.
Bug 1: The infinity glitch
Setting Game.cookies = Infinity; sounds like the ultimate cheat. In practice the game’s building cost formula cannot process infinity as an input. Buildings display a price of Infinity and become unpurchasable even though your balance reads infinite. Your cookie counter can also flatline at zero after extended play with infinity active.
Use a large finite number instead. The recommended ceiling is:
Game.cookies += 1e15;
// adds 1 quadrillion cookies, well within the safe integer range
// this is enough to buy every building and upgrade multiple times
Bug 2: The negative cookie glitch
Entering a number beyond the safe integer limit causes JavaScript to return a small or negative number instead of the figure you typed. Your cookie balance drops dramatically. This is recoverable if you have an exported save but not otherwise.
Bug 3: The ascension inheritance break
Running Game.RuinTheFun(1); and then ascending through Prestige can break upgrade inheritance. Some upgrades that should carry through ascension do not transfer correctly when acquired through debug commands. If you plan to ascend legitimately, use targeted commands to boost specific values rather than unlocking everything at once.
Safe number reference:
| Amount | Command | Safe? |
| 1 billion | Game.cookies += 1e9; | Yes |
| 1 trillion | Game.cookies += 1e12; | Yes |
| 1 quadrillion | Game.cookies += 1e15; | Yes, recommended ceiling |
| 1 quintillion | Game.cookies += 1e18; | Borderline, may cause display issues |
| Infinity | Game.cookies = Infinity; | No, breaks building costs |
How to Remove the Cheated Cookies Achievement
Opening any cheat method automatically awards the Shadow Achievement “Cheated cookies taste awful.” It does not block other achievements or affect gameplay. It is purely cosmetic. Two methods remove it.
Console command:
Game.Achievements[“Cheated cookies taste awful”].won = 0;
Run this after using any cheat. The achievement disappears from your stats page immediately.
Neuromancy debug upgrade:
Inside the Open Sesame panel, enable the Neuromancy upgrade. This unlocks the ability to toggle any achievement on or off directly from the Stats menu under Upgrades. Click the achievement name to remove it.
The underlying save file still contains a cheat flag after either removal method. The cosmetic record is clean but the internal tag remains.
Frequently Asked Questions
How do you cheat in Cookie Clicker without triggering the shadow achievement?Â
Use the cookie duplication command: Game.cookiesEarned += Game.cookies; Game.cookies *= 2;. This bypasses the detection condition that normally tags your save. The autoclicker script at 17ms intervals also produces no cheat flag because the game counts each trigger as a legitimate click.
How do you get cheats in Cookie Clicker that are safe for your save?Â
Stay below 1 quadrillion cookies per command (Game.cookies += 1e15;). Use targeted commands for specific stats rather than Game.RuinTheFun(1); if you plan to continue playing legitimately. Always export your save through Options before running any command.
How do you activate cheats in Cookie Clicker for sugar lumps specifically?Â
Open the browser console with F12 and type Game.gainLumps(10); followed by Game.loadSave();. This adds 10 sugar lumps without affecting your cookie balance, upgrade states, or achievement record. Repeat the command to add more.
How do you unlock cheats in Cookie Clicker on a school or restricted network?Â
The browser console method works on any network that allows you to open the game in a browser tab. No external connections are made when running console commands. The saysopensesame bakery name method works identically on mirror sites like cookie-clicker.io.
What is the safest single cheat code to use without breaking the game?
Game.cookiesPs = 500000; raises your cookies per second to 500,000 without touching your cookie balance, upgrade states, achievement record, or lifetime baked total. It is the most targeted boost available with zero side effects.
What happens if you enter too large a number in Cookie Clicker cheats?Â
Numbers beyond JavaScript’s safe integer limit of roughly 9 quadrillion cause the game to receive a rounded or incorrect value. Your balance may display as a small number or go negative. The maximum recommended single command is Game.cookies += 1e15; which adds one quadrillion cookies safely.
Conclusion
Cookie Clicker cheats work because the game runs in JavaScript and your browser console has direct access to every game variable. Use the duplication command or autoclicker script to cheat without triggering the shadow achievement. Stay below 1 quadrillion per command to avoid the infinity bug and negative cookie glitch. Avoid Game.RuinTheFun(1); if you plan to ascend legitimately later. Export your save before running any command.
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!




