A bookmarklet is a bookmark that instead of storing a URL to a page stores JavaScript code that can be executed on a page.
To save a bookmarklet, either drag it to the bookmarks bar or create a new bookmark with the javascript:...
code as the URL.
You can try a bookmarklet directly by clicking it on this page. Or by copy&pasting it into the address bar, but you will have to readd the javascript:
part in the beginning as it is stripped for security reasons.
These bookmarklets transform a text taken as input and do not load any external resources.
javascript: void(() => {
try {
prompt('Decoded text:', atob(prompt('Decode base64:') ?? (function() {
throw null;
}())))
} catch (e) {
e && alert(e);
}
})()
javascript: void(() => {
try {
prompt('Encoded text:', btoa(prompt('Encode text as base64:') ?? (function() {
throw null;
}())))
} catch (e) {
e && alert(e);
}
})()
javascript: void(() => {
try {
prompt('Text without newlines:', (prompt('Remove newlines (\\n and \\r):') ?? function() {
throw null
}()).replaceAll('\n', '').replaceAll('\r', ''))
} catch (e) {
e && alert(e)
}
})();
javascript: void(() => {
try {
prompt('Decoded text:', decodeURIComponent(prompt('Decode URI Component:') ?? (function(){throw null;}())))
} catch (e) {
e && alert(e);
}
})()
javascript: void(() => {
try {
prompt('Decoded text:', encodeURIComponent(prompt('Encode URI Component:') ?? (function(){throw null;}())))
} catch (e) {
e && alert(e);
}
})()
javascript: void(() => {prompt('UUID:', self.crypto.randomUUID())})()
javascript: void(() => {
const buffer = new Uint32Array(1);
self.crypto.getRandomValues(buffer);
const min = Math.ceil(parseInt(prompt('Min value:')));
const max = Math.floor(parseInt(prompt('Max value:')));
prompt('Random value between ' + min + ' and ' + max + ' (inclusive):', Math.floor(buffer[0] / (0xffffffff + 1) * (max - min + 1)) + min);
})()
javascript: void(() => {alert(prompt('Input:').length)})()
javascript: void(() => {
prompt('Replaced output:', prompt('Input:').replaceAll(prompt('String to replace:'), prompt('Replace with:')))
})()
These bookmarklets modify the content of the page and do not load any external resources.
javascript:void(document.title=prompt('Enter page title') ?? document.title)
javascript:setTimeout(()=>location.reload(), prompt('Reload the page in seconds:')*1000)
javascript:var orientation = prompt('Rotate by degrees (90,180,270...):');
[...document.querySelectorAll('img')].forEach(el => el.style.transform = 'rotate(' + (parseInt(orientation)) + 'deg)')
javascript:void(document.body.contentEditable=true)
javascript:(function(){document.documentElement.style.filter='invert(1)';})();
javascript:void(document.documentElement.style.colorScheme='dark')
javascript: void(() => {
try {
alert(eval(prompt('JavaScript code to evaluate:') ?? (function(){throw null;}())))
} catch (e) {
e && alert(e);
}
})()
javascript: void(() => {prompt('Document outer HTML:',document.documentElement.outerHTML)})()
javascript: void(async () => {
try {
prompt('Selected HEX color:', (await new EyeDropper().open()).sRGBHex);
} catch (e) {
alert(e);
}
})()
javascript: void(() => {prompt('User agent:', navigator.userAgent)})()
javascript: void(() => {
open('https://google.com/search?q=' + encodeURIComponent(getSelection().toString().length === 0 ? prompt('Query to search:') ?? (function() {throw null;}()) : getSelection().toString()));
})()
javascript: void(() => {
open('https://google.com/search?q=site:' + location.hostname + ' ' + encodeURIComponent(getSelection().toString().length === 0 ? prompt('Query to search on ' + location.hostname + ':') ?? (function() {throw null;}()) : getSelection().toString()));
})();
javascript: (() => {document.querySelectorAll('input[type=password]').forEach(el => el.type = 'text')})();
data:text/html,<title>Textpad</title><style>@media (prefers-color-scheme: dark){html {color-scheme: dark;}}</style><body contenteditable spellcheck="false">
These bookmarklets open an external site with some information from the current page.
javascript: void(
open('https://chart.apis.google.com/chart?cht=qr&chs=300x300&chld=L|2&chl=' + encodeURIComponent(location.href), null, 'location=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=500,height=500,modal=yes,dependent=yes')
);
javascript: void(() => {
open('https://chart.apis.google.com/chart?cht=qr&chs=300x300&chld=L|2&chl=' + (prompt('Enter text for QR code:') ?? (function() {
throw null;
}())), null, 'location=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=500,height=500,modal=yes,dependent=yes')
})();
javascript:void(open('https://www.alexa.com/siteinfo/' + location.hostname));
javascript:void(open('https://web.archive.org/web/*/' + decodeURIComponent(location.href)));
javascript:void(open('https://archive.is/search/?q=' + encodeURIComponent(location.href)));
javascript:void(open('https://google.com/search?q=cache:' + encodeURIComponent(location.href)));
javascript:void(open('https://developers.google.com/speed/pagespeed/insights/?url=' + encodeURIComponent(location.href)));
javascript:void(open('https://downforeveryoneorjustme.com/' + location.hostname));
javascript:location.href='https://[INSTANCE HOSTNAME]/authorize_interaction?uri='+document.querySelector("h1 > small").innerText
⚠ These bookmarklets modify the content of the page using an external script. Make sure you trust and understand the source code before running it on a sensitive website.
All the bookmarklets below load remote scripts with a subresource integrity check. This means if the content of the external script changes, the script won't load.
The following bookmarklets won't work on pages with a Content Security Policy that blocks external scripts.
javascript: void(() => {
const script = document.createElement('script');
script.crossOrigin = 'anonymous';
script.integrity = 'sha256-Zz2LCa5JP/pTvQZgI64e/nH4Wp84M2rLGUb2AtrGtPY=';
script.onload = () => eruda.init();
script.src = 'https://cdn.jsdelivr.net/npm/[email protected]/eruda.js';
document.head.appendChild(script);
})();