Wednesday, February 23, 2011

A bookmarklet for

shortDOI is a URL shortening service that takes DOIs and converts them to short URLs such as, which is nice for emails and Twitter. You can add the bookmarklet by dragging this link to your bookmarks: shortDOI. It will try to find the DOI in the current page and direct you to shortDOI.

A shortDOI URL is probably more persistent than, say,, as it's backed by the organization that maintains the DOI infrastructure. However, if would go down, you could always use a search engine if you have the original DOI, but the shortDOI URL will be worthless.

Update 24.02.2011: Use some majority voting to find the right DOI.
Update 01.03.2011: Expand the list of allowed characters. Does anybody know which characters can be part of the DOI?
Update 29.07.2015: Be strict about having a prefix and suffix. First check for the "citation_doi" meta tag before looking in the rest of the document.


Duncan Hull said...

Hi Michael, nice idea and it works well.

It seems to struggle on some nature pages though, claiming there is more than one DOI on the page...


Michael Kuhn said...

Hi Duncan,

the reason was the Nature page is full of the references' DOIs. I've changed the bookmarklet to use majority voting, i.e. it'll take the most common DOI (which is hopefully the correct one).

matthis said...

Worked for a couple of examples I tried,
but failed for the following examples:

Michael Kuhn said...

Hi Matthis,

thanks for checking it out! I fixed the bookmarklet. As it turns out, many journal articles have a dedicated tag nowadays, which makes extraction of the DOI even easier. It now works for both your examples.

matthis said...

thanks for the update! I can confirm that the code from the gist does now work. If you also update the link in the blog post, installing the bookmarklet will be as easy as before (just dragging it to the bookmark bar).

Michael Kuhn said...

Ah, thanks for the reminder!