All hacks updated as of 19th April 2026 based on game changes.
Tired of just jumping over cacti? Let’s take it to the next level with some simple hacks you can try right in your browser!
What are we hacking?
When you lose internet connection in Chrome, a hidden endless runner game appears. Tap space to start, and our pixelated dino begins a desert adventure!
But… what if we could cheat?
Even if you’re not a programmer, here’s something cool: the Chrome Dino game is built using JavaScript, and its internal game code is exposed globally. That means we can actually poke around and change how the game works — right from the browser!
Thanks to JavaScript’s flexible (and kinda wild) nature, we can override built-in functions and tweak the game’s behavior without needing to dig into the source files. All you need is the Chrome Developer Console, and a few clever lines of code.
How to play it?
💡 Pro Tip: Can’t get the “No Internet” screen to show up?
Just open a new tab and go to chrome://dino — the game works even when you’re online!
If this is your first time discovering the Dino game, welcome! It’s super easy to play:
Jump: Press Spacebar or Up Arrow (this also starts the game)
Duck: Press Down Arrow (useful when those sneaky pterodactyls appear after 450 points)
Pause: Press Alt
Night Mode: Every 700 points, the background switches to black for 100 points — just to keep you on your toes!
Advertisement
Where to enter the hacks?
Chrome Developer Tools
The Developer Tools (DevTools) is a panel built right into Chrome that lets you inspect and interact with any web page — including its JavaScript code. Think of it as a secret control room for the browser.
To open it and get to the Console:
- Press
F12orCtrl + Shift + Ito open DevTools, then click the Console tab. - Shortcut:
Ctrl + Shift + Jjumps straight to the Console.
- Press
Cmd + Option + Ito open DevTools, then click the Console tab. - Shortcut:
Cmd + Option + Jjumps straight to the Console.
📱 On a phone or tablet? Mobile browsers don’t have DevTools — but you can still hack the Dino using a bookmarklet. No computer needed!
👉 Chrome Dino Hack Mobile Bookmarklet
You could also try the Embedded dino game below, which has a built-in console for testing the hacks live!
- Press
F12orCtrl + Shift + Ito open DevTools, then click the Console tab. - Shortcut:
Ctrl + Shift + Jjumps straight to the Console.
You’ll see a blinking cursor where you can type JavaScript commands directly. After typing each command, press Enter to run it.
A few things to keep in mind:
- The commands are case-sensitive — type them exactly as shown.
- Seeing
undefinedafter a command? That’s completely normal. It just means the expression didn’t return a value, which is expected for most of these hacks.
OR, try the hacks right here!
If you want to jump straight into the fun, you can try all the hacks live in the game embedded below.
Use the Console text-box to paste the code snippets. Mobile users can also enjoy with the on-screen console!
1. Immortality (God Mode)
Want to make your dino un-killable? Let’s activate God Mode using a little JavaScript magic.
Activate God Mode
Paste this into the Console to save the original function and disable game over in one go:
var original = Runner.prototype.gameOver;
Runner.prototype.gameOver = function() {}; Boom — your dino is now immortal. It’ll just run through cacti like a champ.
How to Stop It
If you want to restore the game to normal (or get bored of being a god), use this:
Runner.prototype.gameOver = original; This only works if you ran the block above first. Otherwise, just refresh the page.
How does it work?
In JavaScript, functions are just objects — and they can be replaced on the fly.
The gameOver function is normally triggered when the dino crashes.
By saving it first (var original = ...) and then replacing it with an empty function (function() {}), we stop the game from ending.
When you’re done, you just restore the original function by assigning it back. Think of it like temporarily muting the crash handler!
This works only because JavaScript allows us to override methods of objects while the game is still running in the browser.
Advertisement
2. Tweaking Speed
Want to put the pedal to the metal? Or maybe slow things down for a relaxing run? The game normally starts at a speed of around 6 and gradually increases as your score climbs. With this hack, you can take full control of the pace.
Use the text box below to input any speed — 1000 for pure chaos, 50 for a fast but still-playable pace, or 1 for dramatic slow motion.
The default starting speed is 6.
Copy the code snippet using the button and paste it into the Console to set the speed.
3. Setting the Current Score
Want to jump right into the action with a specific score? You can set the score to any value up to 99999 (but no higher!). Enter your target score below and then Copy the code snippet using the button. Paste it into the Console to set the score.
How does it work?
Internally, the game tracks how far the dino has run using a property called distanceRan.
The visible score on screen is calculated by multiplying distanceRan by 0.025.
By dividing your desired score by that constant, you get the right internal value to set.
⚠️ Note: The score resets when the game ends, so don’t forget to re-enter the command if you want to keep the score high!
Experiment with different values to make your dino feel like a seasoned pro right from the start!
Advertisement
4. Jumping Height
Want your dino to leap over obstacles in a single bound, or keep jumps tight and controlled? You can tune the jump velocity to your liking.
The default jump velocity is 10. Increasing it makes your dino launch higher into the air, while decreasing it results in shorter, snappier hops.
Try 20 for floaty, sky-high jumps that easily clear everything on screen, or drop it to 5 for a low, fast hop that’s great for clearing small cacti quickly.
Combined with God Mode, a high jump velocity lets you sail through the entire game without a care in the world!
5. Walk in Air
Ever wondered what it’s like for the dino to defy gravity? You can make it walk through the sky with this fun trick!
This widget configures an offset X:
- Positive
X: moves the dino up. - Negative
X: moves the dino down.
How it works?
The game exposes a property called groundYPos which controls the vertical position where the dino rests (pixels from the top of the canvas).
The original baseline ground level used by the game is 93.
The game canvas uses a top-left origin where Y values increase downward.
The hard-coded resting Y position for the dino is 93 (the baseline).
By applying a subtraction 93 - X, the widget lets you think in terms of an offset from that baseline rather than an absolute coordinate.
This abstraction keeps the baseline intact (93) and lets the offset you pick move the dino relative to that known ground level.
Obstacles continue to be rendered at their fixed Y coordinates, so changing groundYPos can let your dino appear to walk above or below the normal ground line — handy for experimentation, demos, or just goofy runs!
Advertisement
6. Auto-play
Want the dino to play itself? Here’s a bare-minimal auto-jump script that will make the dino automatically jump over obstacles as they approach.
🛑 Note: This script will crash at higher speeds and can’t duck!
👉 Check out the full blog post (Chrome Dino Autoplay) to get the perfect, unbeatable version.
const autoPlay = setInterval(() => {
if ((Runner.instance_ || Runner.getInstance()).horizon.obstacles[0]?.xPos < 120) {
document.dispatchEvent(new KeyboardEvent("keydown", {keyCode: 32}));
}
}, 20); Stopping Auto-play
To stop the auto-play, simply clear the interval:
clearInterval(autoPlay); 7. Invisibility
Want to make your dino invisible? It’s easy to do by simply disabling its drawing function! This will prevent the dino from being rendered on the screen, making it fully invisible.
Make the Dino Invisible
const runner = Runner.instance_ || Runner.getInstance();
const originalDraw = runner.tRex.draw;
runner.tRex.draw = function() {}; This code replaces the dino’s draw function with an empty one, meaning the dino won’t be drawn on the canvas.
Note: The dino can still die if it collides with obstacles
Restore the Dino
To bring the dino back, simply restore the original draw function:
const runner = Runner.instance_ || Runner.getInstance();
runner.tRex.draw = originalDraw; Now the dino is visible again, and the game continues as usual!
Advertisement
8. Moon Gravity
Want to experience what it’s like to run on the moon? You can reduce the gravity in the game to make your dino floaty and slow down its descent after jumping. The default gravity is around 0.6. Setting it to a lower value will give you that lunar bounce!
const gravity = 0.2;
Object.assign((Runner.instance_ || Runner.getInstance()).tRex.config, { GRAVITY: gravity, gravity: gravity }); This code snippet handles both the original GRAVITY and the new gravity so the same snippet works across different game versions.
9. Manual Controls (Mario-Style)
What if we stop the automatic “treadmill” that the Dino runs on, and instead map the movement directly to your keyboard like Super Mario?
Because the Chrome Dino engine was fundamentally designed to only ever go forward automatically, forcing it to allow left/right manual control breaks the game engine in some absolutely hilarious ways.
By injecting the script below, we accomplish two things:
- We lock the game’s internal speed and map it to your Left and Right Arrow keys.
- We force a negative speed into the engine when you run left.
(function() {
const MAX_SPEED = 6;
const ARROW_LEFT = 'ArrowLeft';
const ARROW_RIGHT = 'ArrowRight';
let lockedSpeed = 0;
/* Hijack the speed property */
Object.defineProperty(Runner.instance_ || Runner.getInstance(), 'currentSpeed', {
get: function() { return lockedSpeed; },
set: function(value) { /* Block the game's internal acceleration loop */ }
});
document.addEventListener('keydown', function(e) {
if (e.code === ARROW_RIGHT) {
lockedSpeed = MAX_SPEED;
} else if (e.code === ARROW_LEFT) {
lockedSpeed = -MAX_SPEED;
}
});
/* Slam on the brakes the moment the key is released */
document.addEventListener('keyup', function(e) {
if (e.code === ARROW_RIGHT || e.code === ARROW_LEFT) {
lockedSpeed = 0;
}
});
})(); What happens when you run this?
Once you paste the code and press Space to start, the game will sit completely still until you press an arrow key. Pressing Right moves you forward normally, but the real fun starts when you press Left:
- The Moonwalk: Because the game only has one sprite sheet, the T-Rex does not have a “running left” animation. When you hold ArrowLeft, the ground will scroll to the right, but the Dino will just continue his running animation facing forward. He will moonwalk backward through the desert!
- Time Travel: The game calculates your score based on distance ran. Because you are feeding a negative speed into the engine by running left, your score will actually start counting backwards!
- The Empty Void: To save memory, the game engine deletes cacti as soon as they pass behind the Dino. If you turn around and run left, those cacti are gone forever. Keep running left, and you’ll eventually enter an infinite, empty white void!
Keep having fun and may your dino run forever!
Share this page around and comment down if you have tricks of your own!
Time to try some other great hacks — Wordle, Minesweeper, TypeRacer.
Advertisement