Alter all websites in the world

Martin Brinkmann
Dec 29, 2007
Updated • May 21, 2018

The following is a nice trick that I learned on a webmaster forum. I thought it would be nice to describe it to you as well because you can have some fun with it.

It allows you to manipulate all elements of a website directly in the browser that you are using. You could for instance create number one positions on Google, add your own products to Amazon or write a cover story on CNN.

The changes are only temporary but you can make a screenshot and send it to your friends to have some fun when they are trying to figure out what the heck is going on.

alter all websites

This is also a reminder that anything that is shown on screenshots can be easily faked. This is especially true for website revenue screenshots for instance which you often get as proof when you are about to buy a website, or visit "earn money" blogs and sites around the websites.

All you need to do is load a website and load the following code in the address bar:

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

Make sure you paste everything in one line and hit enter afterwards. Once that is done you can easily edit elements on the website. I created a short video that shows how I edited the Microsoft homepage.

Update: Please note that most web browsers nowadays prevent the pasting of JavaScript into the address bar, or to be more precise, the execution of pasted JavaScript, to prevent social engineering attacks.

JavaScript code needs to be executed from the JavaScript console in those browsers. Google Chrome makes one available for instance when you press Ctrl-Shift-J. Just paste the code into the console, hit enter, and start editing the page you are on like you normally would. Other browsers have JavaScript consoles as well so that is all that changes in this regard.

Firefox users needs to press Ctrl-Shift-K to bring up the console. They can then paste the code into the console to execute it. If it does not work, check for reported errors which should appear right after you hit the enter key.

Internet Explorer users can tap on F12 to bring up the Developer Tools and switch to Console, or use Ctrl-2 to go there.

Note: You may receive an "undefined" status message when you execute the code in the browser. This does not mean that it is not working, and you should be able to edit the web page right away afterwards regardless of the code.

Alter all websites in the world
Article Name
Alter all websites in the world
The article reveals code that you can execute in any web browser to edit any element on any website that you visit in the web browser.
Ghacks Technology News

Previous Post: «
Next Post: «


  1. Dwight Stegall said on March 25, 2015 at 10:55 am

    You can also remove images, move them around with drag and drop or even add images from your hard drive or the web. Great for pranking friends if you don’t mind never being spoken to or trusted again. :) Many years ago Opera had a similar feature built into it. This method works in all browsers that support JavaScript. I call it “Web Designers’ Nightmare”.

  2. kennedy said on February 19, 2011 at 3:22 am

    Cool but as soon as you refresh the page the code goes away which is usless unless you are creating fake screen shots. Unless you could find the script of that website and paste the code there, or make the edited content a URL/HTML adress and redirect the web adress there or if you download the website and find the editor content or access it from the local wifi network from which it runs or upload a worm to the site with that javascript inside it which would make it publicly avalible to edit otherwise it is only temporary.

    Sorry Dude

  3. rruben said on December 30, 2007 at 1:11 am

    cool trick, I will try that out to fool some guys whaha

  4. Reeez said on December 29, 2007 at 8:50 pm

    how cool is that? … but somehow senseless ^^

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.