Cut and paste one line of code to make any website editable

by Patrick Altoft on / 148 responses

Have you ever wanted to edit the web pages of another website? This simple line of code makes it possible.

Of course you can’t actually edit the actual web page but you can edit the page as you see it on your screen.

This is one of the ways scammers create fake screenshots, fake Adsense & affiliate earnings and even fake Paypal transactions.

All you need to do is visit the site you want to edit, paste the code below into your web browser address bar (tested in Firefox & IE7) and hit the Enter button.
Then simply select a portion of text on the page and start editing.

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

Patrick Altoft is Director of Search at Branded3, a Leeds SEO & Digital Agency specialising in SEO, Web Design, Development & Social Media.

Get daily posts direct to your inbox

You can get our blog posts delivered for free by email every day - simply add your email address to the box above, or alternatively you can grab the RSS feed.

Comments

Read the 125 comments below, or add your own!

July 7, 2008 at 10:39am

Now, I understand, how the affiliate marketers, and the authors of the million dollar secret formula actually operate.
Thanks.

Reply

July 7, 2008 at 12:22pm

That’s quite scary – I knew it was possible by altering the HTML and resaving somewhere, or by doing some Photoshopping, but that’s just much simpler.

Reply

July 7, 2008 at 1:48pm

Like Rob I knew it could done but never realised how quick it could be. I suppose this is just one of a number of ways it could be done though. Guessing the lesson here is always beware what links you are sent?

Reply

July 7, 2008 at 4:54pm

You are aware that the editong happens only inside the momory of your browser??? You can edit what you want but you will not be able to save your “Work”

So it is just a funny joke that will not harm your pages in any way.

Reply

July 7, 2008 at 4:56pm

Yes I’m aware of that. Pretty cool though.

Reply

Dean
July 8, 2008 at 12:47pm

did you even read the post?

“Of course you can’t actually edit the actual web page but you can edit the page as you see it on your screen.”

Reply

July 7, 2008 at 7:01pm

Hehe, awesome hack, Patrick. I’m not too sure about disclosing this little secret right here, who knows what scams might occur if it falls in the wrong hands :<

Reply

moron@moron.com
July 7, 2008 at 7:16pm

Seriously…you guys are morons. Like you said, this does NOTHING WITH THE HOSTED VERSION.

it’s just a few seconds easier than saving and modifying the source locally.

Reply

July 7, 2008 at 9:38pm

I think that you may have missed the point that Patrick is trying to make, here – it’s not about editing the hosted version at all. It’s about being able to easily forge things like screenshots, and go “look at this! Here’s a screenshot of an actual Adsense page, with over $10m in earnings!”. It doesn’t matter whether the changes get saved or not – it’s simply about being able to create fake screenshots easier.

Reply

moron@moron.com
July 8, 2008 at 12:01am

Why wouldn’t they just download the page and edit it. There are tons of scripts that already do this. There are tons of editors that do this for you online too (like FCK Editor).

I feel like I’ve jumped back in time to 2001 when this was new.

Reply

otacon
July 8, 2008 at 1:50pm

Yesterday a friend of mine came to meet me at my office.
I last saw him some years ago at high school.
He talked for long about earnings he was raising through adsense. Sitting at my desk, using my firefox, he showed me (after a short phone call I had to answer) his huge adsense earnings on the adsense profile.
But after reloading the page, it revealed as a fake.

I think this is the kind of story this link is about.
Many would trust what they read on *theyr* screen, not wondering about hitting F5 to test it out.
And many more can, with a bookmark, fake screenshots without learning html or at all.
btw, I never trust screenshots, do you?

Reply

bofh
July 7, 2008 at 7:22pm

Wow. There is one thing I really love about this — with firefox, you can save the edited page.

I’ve always wanted a decent editor that could just work w/ templates.

Seriously — got a tipjar? :-)

Reply

bofh
July 7, 2008 at 7:25pm

I should also mention, it will save the various Editibles into the final document, so be sure to remove before upload if you do this :)

Reply

Matthew
July 7, 2008 at 7:35pm

This works in Safari as well!

Reply

July 7, 2008 at 7:37pm

This is very cool and scary

Reply

prags
July 7, 2008 at 7:40pm

Fair enuff, but wats the point if i cant save my designs????

Reply

July 7, 2008 at 8:40pm

@ visitor, not true.

@ prags, just make the changes you want then “Save Page As…..” under “File” in Firefox. This does not change the way the page is served up from the internet, but you can save a changed version of it to your desktop or something.

Reply

nobody
July 7, 2008 at 7:47pm

This should be handy for note taking (other than using some other firefox extensions). I just made this code a bookmarklet. Now for writing papers and such, I can find a web page, click my bookmarklet, make notes, then save the web page w/ notes. Much faster than editing source, and better formatting than copying to Word/notepad/whatever, and adding notes there. If someone has a better way of taking notes, point me to the extension.

Reply

hmm
July 7, 2008 at 8:10pm

so then how would you edit a website with a blank index.html tag so you can edit the files in that same folder!?

Reply

July 7, 2008 at 8:19pm

Works in Opera too. Neat trick!

Reply

July 7, 2008 at 8:59pm

You can also do this within Firebug. Very cool, and you don’t need a plugin.

Reply

July 7, 2008 at 9:20pm

Actually the ‘title’ is possible:) Just put a simple script and make your site editable in 7 minutes.

Users Guide ScreenCast:
http://www.core.gen.tr/videos/asli9.swf

Desginers Guide ScreenCast:
http://www.core.gen.tr/videos/asli101.swf

Product Info:
http://www.core.gen.tr/#coretal

Reply

July 7, 2008 at 9:37pm

That’s insane! very c00l for developers to mess around with ideas, layouts ….

Reply

July 7, 2008 at 9:45pm

Holy hell this is insane. I had no clue it was this easy to do…

Reply

noptical
July 7, 2008 at 9:47pm

The dangers don’t lie in screenshots, they lie with people who edit hidden form values to change item prices, and people who edit AJAX for malicious purposes.

Sure the changes aren’t saved on the server, but that doesn’t mean the page stops being able to interact with it.

Reply

July 8, 2008 at 11:19am

Why would you include item prices in your hidden values. There is no need for that and is bad design. Item prices should be stored server-side (a database for example).

If your webshop needs you to have item prices in the hidden values, then you should try another webshop.

Reply

July 7, 2008 at 9:50pm

While trying it on various sites in my favorites list, found that funnyordie.com displays only a login form after entering this javascript url in the address bar. All images and text from the page are hidden.

Reply

July 7, 2008 at 10:03pm

this is madness! Its actually quite fun to play with though :D

Reply

CaptainObvious
July 7, 2008 at 10:51pm

Or you could just use Firebug and it’s a lot easier, cleaner, and faster…

Reply

Tipper
July 7, 2008 at 11:40pm

In Firefox, once you type the command in the address bar and hit enter, grab the command and drop it into the bookmarks toolbar, then right click, properties, change name to “Edit” and there you have it, a nice little button handy for when you need it.

Reply

July 8, 2008 at 12:40am

That’s pretty wild stuff. It definitely explains a lot of the clickbank “earnings” I’ve seen from a lot of folks. ;)

Reply

July 8, 2008 at 1:17am

Is there any /other/ line of code which can allow me to save and use a page as an offline web application?

Reply

d00d
July 8, 2008 at 1:22am

Any way to add this the the head of an HTML file to make it permanent and automatic to visitors?

Reply

Larry
July 8, 2008 at 4:58am

Works in Opera 9.50

Reply

liquidpele
July 8, 2008 at 5:40am

Ummm… have you guys never heard of the “firebug” firefox plugin?
It lets you edit the DOM live, even the dynamically generated stuff.

In other words, there are actual tools for this – most of them are for debugging your own web development. Thinking this kind of thing is important is like thinking it’s important that someone knows that my username bought a hard drive on ebay last year. Ooooh, scary!

Reply

July 8, 2008 at 6:05am

OMGWTF, you people ain’t heard of Firebug yet?

Reply

ralph natterbough
July 8, 2008 at 8:39am

hey, 2001 called and wants its leet hax back!

Reply

July 8, 2008 at 8:42am

This is quite scary.

Donno how much scam had already been done and how many affiliate marketers have laughed all their way to the banks.

Reply

S
July 8, 2008 at 9:40am

Phew! I used to do this using FF and FireBug. But this is much cooler!

Reply

July 8, 2008 at 11:39am

You do realise that everyone is going to test it on your page? ;-)

Great trick!

Reply

ben
July 8, 2008 at 12:01pm

haha nice one.

Reply

ODP
July 8, 2008 at 1:04pm

This is also a standard feature of Opera.
To edit the source:
1. View > Source (Or Ctrl+U)
2. Make the edits in Opera’s color-coded Source Editor
3. Click “Apply Changes”

Bam, site’s edited.
Also, with the developer tools you can view all of the scripts, DOM, and all of the errors that show up in the code.
Tools > Advanced > Developer Tools

It’s cool to see that you can do this in IE, though.

Reply

July 8, 2008 at 4:32pm

Does it illegal for this work?
I am new comer know not much about that.

Reply

July 8, 2008 at 4:34pm

how does it work?

Reply

July 8, 2008 at 8:28pm

You can do this with Firebug… And more. Kudos anyway, it works in IE at least.

Reply

July 8, 2008 at 8:44pm

Freakin awesome now i can edit microsoft,ibm,sony website and take screenshots.Thats it!

Reply

ext
July 9, 2008 at 12:01am

Very cool

Reply

turnthebeataround
July 9, 2008 at 5:27pm

I just tested it out on this page using Firefox 3. Amazing. (Maybe I can trick my moron inexperienced kid brother into thinking I’m magic after I hide the URL bar…)

Reply

Lars
July 11, 2008 at 8:36am

Also works in Safari on a Mac

Reply

July 12, 2008 at 9:59am

Omniweb has had this feature for years. Very helpful when troubleshooting code.

The anecdotal story about fake adsense earnings is hilarious. I can’t quite believe it though.

Reply

July 13, 2008 at 10:40am

good, useful article.

Reply

July 13, 2008 at 11:15pm

Have you ever wanted to edit the web pages of another website? No, just my sites.

Reply

July 17, 2008 at 3:15pm

Thanks for sharing this simple yet powerful javascript code.

Reply

July 22, 2008 at 2:15am

I have been using the edit features of the Web Developer toolbar for what seems like years to do this while testing out html and CSS. The Scrapbook extension for Firefox is nifty too. It allows you to download a local copy of a webpage but you can erase the parts of a page you don’t want first- e.g. you just want to save the text and delete sidebars, footers, images etc…

Reply

July 26, 2008 at 8:01am

Thats pretty cool,
Fake Adsense Stats

Reply

Robert
July 28, 2008 at 5:20pm

Wow. I just tried that and it is a bit scary. However, will be neat to play joke on my sons with it.

Peace

Reply

July 30, 2008 at 12:24am

Wow, now I think this infomation is worth more than the books “millionaire authors” sell.

Reply

CodyG!!!!!
August 3, 2008 at 1:49am

U can turn editing off by entering

javascript:document.body.contentEditable=’false’; document.designMode=’on’; void 0

and the edit mode will be off.

Reply

August 8, 2008 at 5:39am

Ok now I have to try it…

Reply

abcd
August 21, 2008 at 1:14pm

cant we then save what we have edited suppose i add funds in account and then cant it be save refering page see the same page that is original so there is no saving of page

Reply

October 3, 2008 at 3:33pm

How do you save it when you are done with editing?

Reply

October 25, 2008 at 3:55am

can you or any one tell me what im doing wrong on copy and paste from clickbank to my website on hoplink i can copy and paste but then i cant get that ling to activate on my site need help for dummy. thanks call me if you want 865 470 4154 or email

Reply

December 18, 2008 at 3:18pm

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

Reply

December 20, 2008 at 3:02pm

This is quite scary.Nice trick bT pRbZ is d anY eDItable itEm doEsnT SavE..

How do you save it when you are done with editing?????

Reply

December 21, 2008 at 6:08am

Yes correct the real dangers lurk in the form of sql injection attacks and scripting attacks by changing the forms and making them post malicious values to the processing script.

Also yes it is quite usefull for manipulating web screenshots etc but I thought graphic programs like photoshop would do a more expert work of manipulating screenshots !

Reply

January 16, 2009 at 8:37am

Very funny……I really enjoyed using this.

Reply

March 13, 2009 at 3:34pm

Wow! Didn’t even know about such an interesting thing. You can send fake statistics to webmasters, make cruel jokes or anything else. But… ya… I’ll never trust screenshots now. :) ))

Reply

April 9, 2009 at 7:56pm

now find out how to save it

Reply

Pic
April 10, 2009 at 3:44pm

I should also mention, it will save the various Editibles into the final document, so be sure to remove before upload if you do this .

Reply

April 14, 2009 at 1:40pm

Good day.

Ho w can I edit our own website, I want to put some contact details and information of our company to our website, how can I do that.

Reply

April 18, 2009 at 10:23am

Wow! Never known that’s possible!

Reply

May 4, 2009 at 6:18pm

Man this is the best thing ever! I hust played a trick on my boyfriend using one of his favourite sites Ha Ha!

Reply

JAZZA
May 11, 2009 at 9:43am

Mine isnt working y is this i am copy and pasting the code?:javascript:document.body.contentEditable=true’;document.designMode=’on’void 0 is that the right code or am i doing something wrong

Reply

May 16, 2009 at 9:07am

how to edit wxisting website and save it

Reply

Clayton
May 21, 2009 at 1:17am

…but can you save the website as it is edited for EVERYONE to see?

Reply

darvin shende
June 4, 2009 at 4:30am

You can edit the website , but you cannot save it.
pls tell me how can save it on server.

Reply

Ashish
September 2, 2009 at 1:06pm

Wow! It was really scary. I was able to make a website blank again!

Reply

Guest
September 4, 2009 at 3:40pm

How do you save in firefox?

Reply

levi williams
October 28, 2009 at 5:49pm

how do u save it after u have changes the website

Reply

Lewiss
November 3, 2009 at 6:00pm

I dont understand how to edit the website or what to do helppppp

Reply

November 15, 2009 at 3:18am

Hmmmm…I’ve never heard about this before,
I’ll try it on my blog :D

Reply

jowanie
November 26, 2009 at 2:08am

Pleas provide me a code on how to update the edited website

Reply

Nicole
November 27, 2009 at 12:37pm

it is easy as 123 and abc that is how i now good luck everyone

Reply

December 17, 2009 at 8:42pm

Cool, I’ll try it later :)

Reply

none
December 19, 2009 at 10:18am

How do you save it

Reply

joel
June 30, 2010 at 10:20pm

screenshot

Reply

December 27, 2009 at 7:59pm

Very interesting bit of code there. I tried it and found it working. I could actually edit websites. Great post!

Reply

January 3, 2010 at 11:17pm

Hi there, never new you could do this, thank you for posting.

Reply

January 26, 2010 at 8:45am

hey i love doing it.

Reply

noname
January 30, 2010 at 10:42pm

How would you make the changes permanent??????

Reply

February 3, 2010 at 5:55pm

how do after change the website how can submit or publish it editable page

Reply

February 4, 2010 at 1:44pm

wow thats really nice and scary as well. being a webmaster i am afraid of it. i dont know how many such tricks exist. will try it

Reply

Oli
February 5, 2010 at 3:39pm

Damn! Thats just made a whole lot of things make a whole lot of sense! Thats how they do it! Thank you so much.

Reply

February 6, 2010 at 6:17am

I think there is nothing to be afraid of this since web hosting providers are all patching up their systems to get around this security flaw.

Reply

tito
February 22, 2010 at 9:50pm

well i try it but it didnt really work for me it dint safe what i had change how can i safe the things i change?

Reply

ali
March 21, 2010 at 8:52pm

keep it up

Reply

March 25, 2010 at 12:20pm

i want 2 edit my website

Reply

mishahri
March 28, 2010 at 4:36am

isnt it sooooo bogus…it doesnt save

Reply

April 22, 2010 at 6:59am

what i wanted to do, was get google maps, still the same and stuff, execpt i wanted to change the look at name of it for my own website, for E.G: prank maps, ghost maps, you get the idea?

Reply

Anonymous
April 29, 2010 at 11:32pm

Guys, you realize this is all just for fun…. once you reload the page, it goes back to normal. did you really think it would be THAT simple to edit any text?

Reply

MeEeEeEe
May 21, 2010 at 9:20pm

OMg….. i used this to edit a website that has ” you can’t see content. fill survey.”box. i deleted it and everything was working. it cool little code.

Reply

Bob
May 29, 2010 at 6:47pm

When you're done, you should add:
javascript:document.body.contentEditable='false'; document.designMode='on'; void 0

Reply

jugheads
June 25, 2010 at 6:52am

this is how big websites can edit their sites… i wonder what i could do to club penguin >:D

Reply

December 12, 2010 at 1:58pm

my browser did not sarch for it

Reply

Truman Capote the Triastermon
January 28, 2011 at 11:14pm

If you could save this then so many websites would die. You can not safe this.

Reply

You Guys Are Idiots
February 1, 2011 at 4:45am

HI EVERYONE. Just so you know, changing “true” to “false” doesn’t actually work. You CANOT SAVE THESE. It’s just meant to play a prank or so that you can take a screenshot and mindfuck someone.

For christ’s sake it’s NOT THAT BIG OF A DEAL.

Reply

March 16, 2011 at 6:07pm

This is a great piece of code and something i was unaware of till now. I’m not new to web editing as such but this is new to me and very cool.

Reply

John
March 21, 2011 at 4:00pm

can I edit a website on a mac? I already tried and I can’t. I don’t know if I am doing something wrong or I just can’t do it on a mac.

Reply

rei
April 1, 2011 at 9:55am

I’m doing my thesis.Graduating BSCS.How can I make a website that is all editable and save changes afterwards….and editing is only allowable upon login of admin….Thanks

Reply

April 2, 2011 at 2:42pm

Hello,

Here is a service that can make any site editable:
http://www.coretal.net/

Also, there is a screencast showing how it works:
http://www.vimeo.com/21781218

Regards.

Reply

April 24, 2011 at 11:05pm

this dont work i ut it in and it says it cant show the page help me

Reply

Jan
May 20, 2011 at 5:25am

or you can save the page(.htm or .html)
and edit the page with notepad.. works like javascript but better. this is how other people get website templates.

Reply

June 20, 2011 at 7:30am

The Green Products Market is exploding and you have a unique opportunity to capitalize on this growing trend. If you ever thought of starting a home based business…this is it…the time is now! No out of the pocket start up cost … No obligation.

Reply

Hi
June 27, 2011 at 6:10pm

To save work press FN+ Print Screen. Open up paint. Paste it in!

Reply

July 5, 2011 at 4:02pm

Hello
I wasent looking for that but still a great post

how did you guys found this information??thank you for your blog I saw it on Google And I saved it .I like. Please send me updates

thank you and have a nice day

Reply

Jay
August 29, 2011 at 4:42am

im trying it but it doesn’t work someone help me!!!

Reply

October 12, 2011 at 4:56am

A cute browser trick that makes for some good practical jokes, but the usefulness in real situations is of course limited. Still, it’s a good lesson in browser capabilities ofr noobs.

Reply

Lainey
October 18, 2011 at 8:25pm

Hey I used to love this trick but it’s not working for me anymore. On Chrome and Safari when I hit enter it just takes me to a search engine now! And on Firefox it’s just plainly not working.

Anyone know why it’s not working anymore? PLEASE email me: fighttheprocess@live.com

Reply

October 20, 2011 at 4:18pm

it doesn’t work it sends me to a new page giving a search on what document.body.contentEditable=’true’; document.designMode=’on’; void 0 is…. how can it work? + i use firefox…..

Reply

November 24, 2011 at 5:06pm

This is great for playing tricks on people, a very cool little tool.

Reply

gorillabond
December 9, 2011 at 11:57pm

Wont work on Firefox 8 ;(

Reply

Jimmy
December 27, 2011 at 3:13am

This code used to work for me, but not anymore :(

Reply

January 2, 2012 at 7:07pm

Perhaps it stopped working because I just tried it and nothing happens. I tried it on both firefox and chrome.

Reply

Ed Kwok
January 10, 2012 at 3:31am

you guys gotta put in a “javascript:documents” etc. (just without quotes) nad that etc of course

Reply

January 23, 2012 at 10:53pm

I used this to edit a website that has ” you can’t see content. fill survey.”box. i deleted it and everything was working. it cool little code.

Reply

23 trackbacks

Leave a comment

Your email address will not be published. Fields marked with an asterisk are required.
 

  *

  *

You can use one of the following tags:
<a href=""><blockquote><code><em><strike><strong>