What Are Bookmarklets? A Plain-English Guide
A bookmarklet is a browser bookmark that runs a small piece of JavaScript instead of opening a web page. You click it in your bookmarks bar, and it does something to the page you are already looking at: highlights every heading, shows the canonical URL, turns the page dark, copies the title as a Markdown link, or sends the URL to another service.
There is nothing to install. A bookmarklet is just a bookmark whose address starts with javascript: instead of https://. That one detail is what makes it work, and it is also why bookmarklets have survived for more than 25 years while countless browser toolbars and plugins came and went.
A bookmarklet in one line
Here is the smallest useful bookmarklet you can make. Save it as the URL of a bookmark, click it on any page, and it pops up the page's address:
javascript:alert(location.href)
And here is one that tells you how many links are on the page:
javascript:alert(document.links.length + ' links on this page')
Real-world bookmarklets are longer, but the idea never changes. The browser sees the javascript: scheme, takes everything after the colon, and runs it as JavaScript in the context of the current tab. The code can read the DOM, change styles, open a new window, or copy text to the clipboard, the same as a script the site loaded itself.
How javascript: URLs actually work
Browsers support several URL schemes: https:, mailto:, data:, file: and a few others. The javascript: scheme is special. When you activate a javascript: URL, the browser does not navigate anywhere. It percent-decodes the text after the colon and evaluates it as script inside the page you are on.
A few consequences follow from that:
- It runs with the page's permissions. The code sees the same
document, cookies (except HttpOnly ones), andlocalStoragethat the page's own scripts see. That is what makes SEO and debugging bookmarklets possible. - It runs only when you click. Nothing happens in the background. A bookmarklet cannot watch you browse, because it does not exist as running code until you trigger it.
- The result matters. If the last expression evaluates to a string, older behavior (still present in browsers today) is to replace the page with that string. That is why most bookmarklets are wrapped in a function or end with
void 0. Our guide to creating a bookmarklet covers this in detail. - It has to fit in a URL. Spaces, quotes, and percent signs need to be encoded, and the whole thing lives on a single line. Desktop browsers handle bookmark URLs tens of kilobytes long, so size is rarely a real limit.
Anatomy of a real bookmarklet
Open the bookmark editor for any bookmarklet in this directory and you will see something like this, shortened here:
javascript:(()=%3E%7Bconst%20c%3Ddocument.querySelector('link%5Brel%3Dcanonical%5D')%3B...%7D)()%3B
It looks cryptic, but it is just three layers. The javascript: prefix tells the browser to run code. The percent escapes, like %7B for { and %20 for a space, keep the code intact as a URL. Inside is ordinary, minified JavaScript wrapped in a function so it does not leak variables into the page. Decode it and you get readable code you can review line by line.
A short history
The javascript: URL scheme arrived with JavaScript itself in Netscape Navigator 2.0 in the mid-1990s. Developers quickly noticed that you could put such a URL in a bookmark and get a reusable button. The name "bookmarklet" was popularized in the late '90s by Steve Kangas, whose bookmarklets.com site collected hundreds of them.
In the 2000s, bookmarklets were how a lot of web services spread. Delicious, Instapaper, Pinboard, and early Pinterest all asked you to drag a "Save" button to your toolbar. Browser extensions later took over many of those jobs, but bookmarklets never went away. Developers, SEO consultants, and accessibility testers still keep a row of them in the bookmarks bar because they work in nearly every desktop browser with zero setup.
What people use bookmarklets for
Most bookmarklets fall into a few groups. Here are typical examples from this directory:
SEO checks
Read the canonical tag, meta description, hreflang annotations, Open Graph tags, or structured data without opening DevTools or a crawler.
Free SEO meta tag checker bookmarklet: title, meta description, H1, canonical, robots, hreflang, viewport and Open Graph…
Front-end debugging
Outline every element to spot overflow, show the viewport size, list cookies and storage, or overlay a grid.
Outline every element on a page with a color based on its nesting depth to spot overflow, stray margins and layout bugs…
Reading and productivity
Force a dark theme, remove sticky headers, read the page aloud, or copy the page as a Markdown link for your notes.
Free Dark Mode Toggle bookmarklet: switch any website to dark mode in one click and back again, with photos and videos…
Sending a page somewhere
Open the current URL in the Wayback Machine, PageSpeed Insights, Google Translate, or an AI assistant. These are often one line of code that builds a URL and opens it.
Free Wayback Machine bookmarklet: open the Internet Archive calendar of saved snapshots for the current page in one…
For a hand-picked list of the most useful ones, see the best bookmarklets for developers, SEOs and designers.
Bookmarklets vs. browser extensions
Extensions can do more than bookmarklets: they can run on every page automatically, add context-menu items, modify network requests, and keep state in the background. Bookmarklets trade that power for simplicity.
| Bookmarklet | Extension | |
|---|---|---|
| Install | Drag a link to the bookmarks bar | Store listing, permission prompt |
| When it runs | Only when you click it | Can run on every page, all the time |
| Permissions | Current tab only, at click time | Whatever the manifest requests |
| Code visibility | The code is the URL; you can read it | Packaged, harder to inspect |
| Updates | Never changes unless you replace it | Auto-updates, sometimes with new owners |
| Sync | Syncs with your bookmarks | Syncs per browser account |
| Mobile | Works with workarounds | Limited or unavailable on many mobile browsers |
| Capabilities | Page DOM, same-origin requests | Tabs, network, background tasks, cross-origin |
If you need something that runs automatically on every page, an extension is the right tool. If you need a quick check you run a few times a day, a bookmarklet is lighter and easier to trust. We go deeper in Bookmarklets vs. Browser Extensions.
Are bookmarklets safe?
A bookmarklet is code that runs on whatever page you click it on, including your bank or your email. That is not a reason to avoid them, but it is a reason to know what you are installing.
The good news is that bookmarklets are unusually easy to audit. The entire program is sitting in the bookmark's URL field. You can open the bookmark editor, copy the address, and read it, or paste it into our Bookmarklet Decoder to turn the encoded one-liner back into formatted code.
When you review a bookmarklet, look for these red flags:
- It loads an external script, for example by creating a
<script src="https://...">element. The code you install can then change at any time without you knowing. - It sends data to another domain with
fetch, an image beacon, or a form, especiallydocument.cookie, form values, orlocalStorage. - It is heavily obfuscated, with long strings of hex or
eval(atob(...)).
Every bookmarklet in this directory is self-contained: no remote scripts, no tracking, and no data sent anywhere except when a bookmarklet's whole job is to open a third-party service (like PageSpeed Insights) with the current URL. We say so on the page when that happens.
Pros and cons at a glance
Why people like them
- Zero installation and no permission prompts.
- They work across Chrome, Firefox, Safari, Edge, Brave, Vivaldi, and Opera.
- They do nothing until you click, so they cost no memory or CPU the rest of the time.
- They sync wherever your bookmarks sync.
- The code is short and readable, and you can edit it yourself.
Where they fall short
- They cannot run automatically on page load.
- They do not work on browser-internal pages like
chrome://settings, the new tab page, or extension stores. - Some sites with strict security settings, such as Trusted Types, break bookmarklets that inject HTML the old-fashioned way.
- Mobile browsers make them awkward to run, though not impossible.
- They cannot make cross-origin requests that the page itself could not make.
If one stops working, our troubleshooting guide walks through the usual causes.
How to start using them
The fastest way to try one is to pick a bookmarklet from the directory and drag its button to your bookmarks bar. If you do not see the bar, press Ctrl+Shift+B on Windows and Linux or Cmd+Shift+B on a Mac in Chrome, Edge, or Firefox. Safari uses Cmd+Shift+B for its Favorites bar. Step-by-step instructions for every major browser, including iPhone and Android, are in How to Add a Bookmarklet.
Want to build your own? Paste any JavaScript into the maker and it will wrap, minify, and encode it for you.
Frequently asked questions
Do bookmarklets still work in 2026?
Yes. Chrome, Edge, Firefox, Safari, Brave, Opera, and Vivaldi all run javascript: bookmarks from the bookmarks bar. They do not run on browser-internal pages or extension stores, and some strict sites block certain techniques.
Is a bookmarklet the same as an extension?
No. An extension is a packaged add-on with its own permissions that can run on every page. A bookmarklet is a single bookmark that runs JavaScript on the current page only when you click it.
Can a bookmarklet steal my data?
A malicious one could, because it runs inside the page you click it on. Read the code before installing, or paste it into the Bookmarklet Decoder, and avoid bookmarklets that load remote scripts or send data to other domains.
Do bookmarklets work on phones?
They do, with a workaround. On iPhone you edit a saved bookmark and paste the code as its address. On Android Chrome you type the bookmark name in the address bar and tap the bookmark suggestion.