Raw JavaScript
Compiled Bookmarklet
Dragging to the bookmarks bar is a desktop-only feature. On mobile, tap Copy above, then manually create a new bookmark in your browser and paste the compiled code as the URL.
How to Use
- Paste your raw JavaScript into the left pane.
- The compiled bookmarklet appears on the right instantly.
- Drag the Drag me to Bookmarks button onto your browser’s bookmarks bar, or right-click it and choose Bookmark this link.
- Navigate to any webpage and click the bookmark to run your script.
On mobile, dragging to the bookmarks bar is not supported — see the note below the output pane for the manual installation steps.
On mobile, dragging to the bookmarks bar is not supported. To install a bookmarklet:
- Paste your raw JavaScript into the input above.
- Tap Copy to copy the compiled bookmarklet.
- Create a new bookmark in your browser (bookmark any page first).
- Edit that bookmark and replace its URL with the copied code.
What Is a Bookmarklet?
A bookmarklet is a browser bookmark whose URL begins with javascript: instead of
http://. When clicked, the browser executes the embedded JavaScript on the current
page — no browser extension or installation required. Common uses include toggling dark mode,
extracting data from tables, tweaking page styles, or automating repetitive tasks.
The Compilation Pipeline
Your code passes through a strict, sequential pipeline:
- IIFE Wrapper — The code is wrapped in
(function() { … })()so local variables don’t leak into the target page’s global scope. - Minification via Terser — The industry-standard Terser library handles comment stripping, whitespace removal, dead-code elimination, and constant folding. It uses a full JavaScript parser so edge cases like regex literals, template literals, and semicolon-free style are all handled correctly.
- URI Encoding — Characters that would break a URL bar
(
%,",',#,&,<,>,`) are percent-encoded so the browser doesn’t mangle your script before it executes.
Privacy
All compilation runs entirely in your browser — your code never leaves your device.