How To Get Google's Pac Man Game On Your Page

People have been asking how they can embed the Google Pac Man Doodle on their web pages.  I decided to pull together a quick embed code to allow people to do so, as long as Google keeps the files live.

Currently, the sound is not working on the embed because Google has disabled it due to annoying users. Also, it does not work with the Prototype Javascript Library. To see an example of this working, click here.

Here is the embed code:

<script>{kEI:"Quz2S63qIYeglAfw8oHGCg",kEXPI:"17259,23663,24477,24661,24745,24770,24808",kCSI:{e:"17259,23663,24477,24661,24745,24770,24808",ei:"Quz2S63qIYeglAfw8oHGCg",expi:"17259,23663,24477,24661,24745,24770,24808"},ml:function(){},pageState:"#",kHL:"en",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,,;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/gen_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;},lc:[],li:0,j:{en:1,l:function(){},e:function(){},b:location.hash&&location.hash!="#",bv:3,pl:[],mc:0,sc:0.5},Toolbelt:{}};(function(){for(var d=0,c;c=["ad","bc","p","pa","zd","ac","pc","pah","ph","sa","xx","zc","zz"][d++];)(function(a){google.j[a]=function(){[a,arguments])}})(c)})();"webhp";{load:{t:{start:(new Date).getTime()}}};try{;}catch(u){};

<script>var _gjwl=location;function _gjuc(){var b=_gjwl.href.indexOf("#");if(b>=0){var a=_gjwl.href.substring(b+1);if(/(^|&)q=/.test(a)&&a.indexOf("#")==-1&&!/(^|&)cad=h($|&)/.test(a)){_gjwl.replace("/search?"+a.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h");return 1}}return 0}function _gjp(){!(window._gjwl.hash&&window._gjuc())&&setTimeout(_gjp,500)};
google.y={};google.x=function(e,g){google.y[]=[e,g];return false};if(!{};{};;window.clk=function(e,f,g,k,l,b,m){if(document.images){var a=encodeURIComponent||escape,c=new Image,;[h]=c;c.onerror=(c.onload=(c.onabort=function(){delete[h]}));if(b&&b.substring(0,6)!="&sig2=")b="&sig2="+b;c.src=["/url?sa=T","",f?"&oi="+a(f):"",g?"&cad="+a(g):"","&ct=",a(k||"res"),"&cd=",a(l),"&ved=",a(m),e?"&url="+a(e.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","Quz2S63qIYeglAfw8oHGCg",b].join("")}return true};
window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o[i]=e[i];google.x(o,function(){})}};</script>
<!-- textarea id=csi style=display:none>
</textarea -->
<iframe name=wgjf style=display:none src="" onload="google.j.l()" onerror="google.j.e()">
<div id=logo style="width:554px;height:186px;background:black url( 0 0 no-repeat;position:relative;margin-bottom:9px" title="PAC-MAN's 30th Birthday! Doodle with PAC-MAN٠& ɱ980 NAMCO BANDAI Games Inc.">
<div id="logo-l" style="width:200px;height:2px;left:177px;top:157px;background:#990;position:absolute;display:none;overflow:hidden">
<div id="logo-b" style="position:absolute;left:0;background:#ff0;height:8px;width:0">
<script>google.pml=function(){function d(a){if(!google.pml_installed){google.pml_installed=true;if(!a){document.getElementById("logo").style.background="black";window.setTimeout(function(){var b=document.getElementById("logo-l");if(b)"block"},400)}a=document.createElement("script");a.type="text/javascript";


google.dom.append(a)}}function e(){if(document.f&&document.f.btnI)document.f.btnI.onclick=function(){typeof google.pacman!="undefined"?google.pacman.insertCoin():d(false);return false}}if(!google.pml_loaded){google.pml_loaded=true;window.setTimeout(function(){document.f&&document.f.q&&document.f.q.value==""&&d(true)},1E4);e();google.rein&&google.rein.push(e);google.dstr&&google.dstr.push(function(){google.pacman&&google.pacman.destroy();if(google.pml_installed){for(var a=(document.getElementById("xjsc")||document.body).getElementsByTagName("script"),b=0,c;c=a[b++];)c.src.indexOf("/logos/js")!=-1&&google.dom.remove(c);google.pml_installed=false}});google.pacManQuery=function(){google.nav(document.getElementById("dlink").href)}}};</script>

<form action="/search" name=f onsubmit="google.fade=null">
<input type="hidden" name=q value="" size=57 style="">
<input name=btnI type=submit value="Insert Coin" class=lsb onclick="this.checked=1">

<div id=xjsd>
<div id=xjsi>
<script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");

(document.getElementById("xjsd")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0);
var h,i,j=1,k=google.time(),l=[];google.rein.push(function(){j=1;k=google.time()});google.dstr.push(function(){google.fade=null});function m(a,f){var b=[];for(var c=0,e;e=a[c++];){var d=document.getElementById(e);d&&b.push(d)}for(var c=0,g;g=f[c++];)b=b.concat(n(g[0],g[1]));for(var c=0;b[c];c++)b[c]=[b[c],"opacity",0,1,0,""];return b}function n(a,f){var b=[],c=new RegExp("(^|\\s)"+f+"($|\\s)");for(var e=0,d,g=document.getElementsByTagName(a);d=
g[e++];)c.test(d.className)&&b.push(d);return b}google.fade=function(a){if(google.fx&&j){a=a||window.event;var f=1,b=google.time()-k;if(a&&a.type=="mousemove"){var c=a.clientX,e=a.clientY;f=(h||i)&&(h!=c||i!=e)&&b>600;h=c;i=e}if(f){j=0;google.fx.animate(600,m(["fctr","ghead","pmocntr","sbl","tba","tbe"],[["span","fade"],["div","fade"],["div","gbh"]]));for(var d=0;d<
l.length;++d)if(typeof l[d]=="function")l[d]()}}};google.addFadeNotifier=function(a){l.push(a);if(!j)a()};
;google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}google.pml && google.pml();</script>
var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("load",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c);a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error",
h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;google.kCSI.imn=b;google.kCSI.imp=e;,google.kCSI)}if(window.addEventListener)window.addEventListener("load",l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());




Bookmark and Share    
blog comments powered by Disqus


posted by on: May 22, 2010 04:38am

it didnt work on my blog. help. here is my blog. when i click insert coin, is doesnt start the game... what do i do?

posted by on: May 22, 2010 04:37am

it didnt work on my blog. help. here is my blog. when i click insert coin, is doesnt start the game... what do i do?

posted by Johnny on: May 24, 2010 12:54am

Google kept the video on a hidden page. Check it out in the video here:

posted by N Alves on: Nov 7, 2011 11:05pm

is there a way of changing the size to make it smalled?

posted by Digital Dave on: Aug 29, 2012 03:15pm

Brilliant! Thanks a ton RustyBrick :) Put it onsite yesterday, and tinkered around and managed to add other content above the game. Wot fun! Me own Pacman 24/7.... Here it is...

posted by on: May 23, 2010 05:16pm

thanks macek, I only spent about an hour on this so I'm glad some other people were able to optimize it and re-enable the sound too.

posted by Paul on: May 22, 2010 05:32am

Checkout for your own downloadable copy. Play offline or upload to a server to play online :)

posted by Jackson on: May 22, 2010 01:47am

It wont work! It just redirects when someone clicks "insert coin"

posted by Swellware on: Oct 5, 2013 02:03am

thanks this was a lot of help :)

posted by the god of godlyness on: Sep 9, 2013 12:58pm

it works just fine on mine.

posted by mark on: May 24, 2010 03:25pm


posted by Piyush Zarkar on: May 24, 2010 04:40pm

simply osum man

posted by jamespickett on: May 22, 2010 04:58pm

amazing i am putting it on my website!

posted by babu on: May 21, 2010 11:32pm

is there a way we can save those files and change up javascript to use file from where u saved it?

posted by on: May 21, 2010 11:43pm

sure, simply locate the .js files in the scripts, download them, and then change the filepaths to your own server.

posted by Marigo Tou Poulou on: May 22, 2010 01:04am

very nice :)

posted by Bart on: May 22, 2010 01:39am

Google Pac-man Kill Screen:

posted by babu on: May 22, 2010 02:18am

I kinda get it but kinda not. can u give me example, I'm using dropbox and iweb for my website I tried replacing the url for. js file to url where my. js is located but it doesn't work only pacman windows showsup but doesn't function

posted by on: May 23, 2010 05:11pm

sorry, I think you have to also make changes within the js files wherever the png file is referenced (if you want to run from your own sources). Also, it waits about 4-5 seconds after page load to start working so make sure you wait first.

posted by mark on: May 24, 2010 03:26pm


posted by Ashutosh on: May 27, 2010 06:16am

Thanks for the effort by putting the embed code... the game is really a stress buster.

posted by on: Nov 27, 2010 04:08pm

posted by on: Nov 27, 2010 04:08pm

posted by guest on: Nov 6, 2010 05:34am

fuck yeah.. this is awesome

posted by Littlemindy on: Nov 10, 2010 06:27pm

hello people :)

posted by NIGGA HOE on: Feb 1, 2011 10:33pm


posted by cast on: Jan 23, 2011 01:27pm

Thank you for sharing with us the article Penis geliştirici orjinal olarak ithal penis büyütücü ilaç şimdi sadece bizde. kız oyunları

posted by Duncanobi on: Feb 6, 2011 04:03pm

Its awesome!

posted by Michael Butler on: Feb 7, 2011 02:48pm

Without me, it's just aweso.

posted by dell gx620 on: Mar 5, 2011 07:38am

I really liked your blog quite informative and interesting facts and figures you have discussed on your blog even the comments are very fruitful and helpful in enhancing the knowledge regarding the topic.

posted by Dell GX620 on: Mar 17, 2011 09:21am

Ms Pac-Man was also one of the first video games to attract a female following at a time when most players were (at least reputedly) spotty boys...

posted by Princehew on: Oct 10, 2010 06:14am

hey i need help.. i cant seem to put in on my site.. i click code. after that this comes out [code][/code] i tried copy paste in between both but it doesnt work =(

posted by air jordan 5 on: Jun 11, 2010 05:02am

Knowledge gives weight, gives glory to achievement, most people only see the glory, not to weigh the weight!

posted by air jordan 18 on: Jul 14, 2010 08:22am

Very vivid appearance, perfect plot, challenging game. Many of us put this game as a very important part of life. Surprise,when I browse the web ,I found these website Pretty good. adidas arenas Signature

posted by vibram on: Jul 8, 2010 05:40am

Mark S. is definitely on the right track. If you want to get a professional looking email address, Id recommend buying your name domain name, like or discount ugg boots If its common it might be difficult to get, however, be creative and you can usually find something.

posted by jordan shoes on: Jul 8, 2010 05:39am

Mark S. is definitely on the right track. If you want to get a professional looking email address, Id recommend buying your name domain name, like or cheap uggs If its common it might be difficult to get, however, be creative and you can usually find something.

posted by air jordan 13 on: Jul 7, 2010 01:22am

Mark S. is definitely on the right track. If you want to get a professional looking email address, Id recommend buying your name domain name, like or Gucci sweaters If its common it might be difficult to get, however, be creative and you can usually find something.

posted by cheap computer on: Jul 15, 2010 07:38am

I really like games and i heard about this pac man game from some one and now i found this blog which gives information that how to have Google's pac man game on your page. Very interesting and helpful blog.

posted by Anonymous on: Jul 2, 2010 04:50am

Check out a Goolge Pacman Level Editor.

posted by Dillsta on: Jul 29, 2010 10:00am

i got it to work but i can only see half of the game HELP PLEASE!!!

posted by on: Sep 13, 2010 07:49pm


posted by Josh on: Aug 26, 2010 06:27am

yer me to it only shows half of the screen can u help me PLZZZ

posted by on: Aug 26, 2010 07:42pm

what you say!?

posted by patryk on: Sep 4, 2010 02:34pm


posted by the chosen one on: Sep 13, 2010 01:56pm

my school blocks this countact to any way yto bypass ://

posted by on: Sep 13, 2010 07:49pm

Sure just go to and wait 10 seconds for the game to load then start playing it.

posted by Dooooo on: Oct 5, 2010 01:51am

this is horrible it ruined my site

posted by on: May 23, 2010 05:14pm

It works, you just have to wait 4-5 seconds after loading the page for it to work. Do not press insert coin until after that. Insert coin enables 2 player mode, not pressing it will be the normal single player.

posted by Jakeman266 on: Apr 25, 2012 02:32pm

does'nt show like a half of the screen

posted by Denzmark24 on: May 1, 2012 10:56am

nice stuff send me a link to subscribe to this blog my email is

posted by Yaseen Abbas on: May 9, 2012 05:14am

Adding games or some extra material can slow your blog performance. online sweepstakeschurch softwareblackjack software

posted by Jennythebuetiful on: Jun 3, 2012 05:11pm

wow... this doesnt work guys... i have netobjects fusion....-_-

posted by Alexnder Chapman on: Aug 7, 2011 04:31pm

Thats exactly what i would need for my Blog since it covers Retro Games. Thank you for sharing :)

posted by Fuckyou on: Nov 10, 2011 01:40pm


posted by bob on: Dec 11, 2011 11:36am

trying to put on weebly but doesn't work PLEASE HELP.

posted by Hibi on: Nov 23, 2013 10:21pm

How can I get the score to save it in a database ?