Bookmarklet Decoder
Paste a bookmarklet to turn it back into readable, formatted JavaScript and see what it touches — network calls, cookies, storage, external scripts. Runs entirely in your browser.
What the decoder does
A bookmarklet is a single line of percent-encoded, usually minified JavaScript. That is great for a bookmark and terrible for a human trying to read it. The Bookmarklet Decoder reverses the process:
- Strips the
javascript:prefix. - Percent-decodes the code, turning
%20,%22,%7Band friends back into spaces, quotes, and braces. Bookmarklets that were encoded twice, a common accident, can be decoded again until they make sense. - Formats it with line breaks and indentation so you can follow the logic.
Decoding happens entirely in your browser. The code you paste is not uploaded, and it is never executed. The decoder only reads it as text.
How to use it
- Get the bookmarklet's code. For one already in your browser, right-click the bookmark, choose Edit (or Edit Address in Safari), and copy the whole URL field. For one on a web page, right-click the button and choose Copy link address. Do not click it.
- Paste it into the decoder and decode.
- Read the formatted output, using the checklist below.
- Want to change something? Copy the decoded code into the Bookmarklet Maker, edit it, and generate a new bookmarklet.
Minified variable names like e, t, and n stay short. Formatting makes the structure clear, but you will still need to follow what each variable holds.
Reviewing a bookmarklet before you install it
A bookmarklet runs with full access to the page you click it on, including your email, your bank, and your company's admin tools. Most bookmarklets are harmless, but checking takes a minute. Look for these patterns in the decoded code.
Red flags
- Remote scripts. Code that creates a
scriptelement with asrcon another domain, or callsimport()on a URL. The real logic lives on someone else's server and can change at any time. This is the biggest risk. - Data sent elsewhere.
fetch,XMLHttpRequest,navigator.sendBeacon,new Image().src = ..., or a form submission to a domain that is not the current site, especially if it includesdocument.cookie,localStorage, form field values, orlocation.href. - Dynamic code.
eval,new Function,setTimeoutwith a string, oratob(...)feeding into any of them. This is often used to hide what the code really does. - Heavy obfuscation. Long arrays of hex strings,
\xescapes, or code that decodes itself. Legitimate bookmarklets are minified, not encrypted. - Credential access. Code that reads
input[type=password]values and does anything with them other than display them on screen.
Normal and usually fine
- Reading the DOM:
querySelectorAll,document.title, meta tags, links, and headings. - Adding styles or a panel to the page, and removing them again.
window.opento a well-known service with the current URL as a parameter, such as Google, the Wayback Machine, or PageSpeed Insights. That does share the URL with that service, which is the point of the bookmarklet.fetchto the same site, like/robots.txtor/sitemap.xml.- Writing to the clipboard with
navigator.clipboard.writeText.
A quick example
Paste this encoded bookmarklet into the decoder:
javascript:(()%3D%3E%7Bconst%20n%3Ddocument.querySelector('link%5Brel%3D%22canonical%22%5D')%3Balert(n%3Fn.href%3A'No%20canonical')%7D)()%3B
It decodes to:
(() => {
const n = document.querySelector('link[rel="canonical"]');
alert(n ? n.href : 'No canonical');
})();
It reads one tag and shows one alert. There is no network access and nothing to worry about. For a full-featured version, see Check Canonical Tags.
About the bookmarklets on this site
Every bookmarklet in our directory is self-contained. None of them load remote scripts, use eval, or send page data to us. The ones that open a third-party service say so on their page. You do not have to take our word for it: drag any of them into the decoder and read the code yourself.
If a bookmarklet stops working after you decode and re-encode it, see Bookmarklet Not Working? 9 Fixes.
Frequently asked questions
Does the decoder run the bookmarklet?
No. It only decodes and formats the text. The code is never executed, so it is safe to paste a bookmarklet you do not trust.
Is the code I paste sent anywhere?
No. Decoding and formatting happen locally in your browser, and nothing is uploaded.
Can the decoder restore original variable names?
No. Minification permanently replaces names with short ones like e and t. The decoder restores readable formatting, not the original names or comments.
What if the decoded code still looks encoded?
The bookmarklet was probably encoded twice. Decode the output again until you see normal JavaScript.