Bookmarklets are little JavaScripts that reside in your browser’s bookmark bar (hence the name). They can be used to do things to the current page, like adding functionality that the page’s developer “forgot” to add.

On this page I am publishing my own bookmarklets. I’m trying to make sure they follow the usual programming standards, but you should know that I’m usually only testing them with Firefox, so I don’t really know if they work in other browsers…


Text Insertion:

The following bookmarklets insert text into text fields (input or textarea) at the current cursor position:

Insert current date

This bookmarklet inserts the current date at the cursor position in the format “dd.MM.yyyy”.

If you need any other format, type a format string, select it and then click the bookmarklet.

The following format codes are understood:

  • dd = day
  • MM = month (note: capital letters!)
  • yy or yyyy = year (2 or 4 digits)
  • hh = hour
  • mm = minutes (note: lower-case letters)
  • ss = seconds
  • S = microseconds

To create a bookmarklet, simply create a new bookmark and copy-paste the following code as the “URL”:

You can test the function here: