Hacking Google Chrome’s T-Rex Game!

Google Chrome, like all other Google products, has an interesting easter egg — the dino game! It appears as an 8-bit dinosaur on the no internet connection page. As soon as you’ll hit the spacebar or just click on it, it starts running!

Maria Nicole
May 31, 2019 · 3 min read

But, do you know, you can also HACK IT!

With the hacks, you can alter the speed of the game and even make your dinosaur immortal (you won't die even if you get hit).

Excited for it? Let’s do it then!

Here’s How to Hack Dino Game (2 Methods)

First of all, disconnect your internet to open the “No Internet” page. For that, You can either turn off your wifi or simply type chrome://dino in the address bar.

The screen will look like this.

Now, right click on the screen anywhere and select Inspect from the submenu. Or, you can use the hotkey combination Ctrl+Shift+I for the same.

This will open the source code version of the same adjacent to the original webpage.

In this section, Go to the Console tab.

Here you will see a command line interface where you can enter lines of code in order to ‘hack’ the dino game and make it run according to you.

You can hack the following features using the respective code provided below.

1. Increasing the Speed

If you think the t-rex running at the normal speed is not so challenging, then this hack is for you!

There is this secret method using which you can increase the speed of the little dino make the game bit more difficult and interesting.

All you have to do is put the following piece of code in the Console tab.


After pasting the code in the console tab, hit Enter.

And Voila! Your t-rex will get a speed boost in no time.

In case, you still want a little more insanity, just increase the number inside the brackets and see the magic.

Don’t forget to hit enter after each command.

2. Becoming Immortal

Another hack for the chrome dino game is the immortality or unlimited life hack. I personally call it cheating rather than a hack for obvious reasons but still, I am sharing it with you.

If you want to win from your cousin or your office colleague in the Google Dino game, I have a little piece of code that can make your t-rex immortal.

To become immortal, just copy and paste the code below into the console tab and hit enter.

var original = Runner.prototype.gameOver

The above line stores the original gameOver function from the game’s code into a static variable ‘original’ (this will help in restoring the functionality).

Now, paste the following code in the console tab and hit enter.

Runner.prototype.gameOver = function(){}

This code will replace the original gameOver function with an empty function. This is what makes you t-rex immortal.

If you’re done with unlimited life and want to switch back to normal, just paste the following line in the console tab and hit enter.

Runner.prototype.gameOver = original

By entering this code, we are actually restoring the gameOver function by transferring the original function that we saved in the variable “original” to its default state once again.

With immortality turned, the game should work something like the image below.

That’s all friends! These were the two easy and simple ways to hack the Google Dino game. It is fun to twist things around make them into some even more interesting for the end user.

By hacking google dino game, I nowhere want to spread any malicious intentions towards Google Chrome or its users.

Disclaimer: This hacking tutorial is for educational purpose only.



Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.


Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Maria Nicole

Written by

Loves to write about Books, Technology and Lifestyle for the millennial audience.


Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store