All tools

Bookmarklet Generator

Wrap JavaScript in a draggable bookmarklet.

Drag this link into your bookmarks bar
Pretty title
Raw URL
javascript:(function(){alert(%22Page title%3A %22 %2B document.title)%3B})();
HTML
<a href='javascript:(function(){alert(%22Page title%3A %22 %2B document.title)%3B})();'>Pretty title</a>

A bookmarklet is a JavaScript bookmark. Drag the styled link to your bookmarks bar (or right-click → bookmark). Click it on any page to run the code. Many sites block bookmarklets via Content Security Policy - try on a page that doesn't.

About

Type JS code and a name. The tool builds a javascript: URL ready to drag to your bookmarks bar. Click the bookmarklet on any page to run the code in that page's context.

How to use

  1. Write your JS.
  2. Drag the link to your bookmarks bar.

FAQ

Why doesn't it work on some sites?+

Sites with strict Content Security Policy (CSP) block inline JavaScript, including bookmarklets. Try the same code on a less locked-down site.