A Script to List Hyperlinks From Your InDesign Document
Use a script to generate a list of hyperlinks from an InDesign file.
A couple of weeks ago, I needed a list of all the hyperlinks used in an InDesign document. (As it happens, it was for our mammoth All Star Tips feature in the final issue of InDesign Magazine,Ā #150.)
The information I neededāthe dozens of links in that featureāwas buried just out of easy reach. The Hyperlinks panel offered many automatically named “Hyperlinkā and a sequential number. Ā And the text in the panel wasĀ selectable, but un-copy-able.Ā

In short, the destination URLs were not visible without physically editing the links one by one.Ā
āThereās got to be an easier way,ā I kept muttering to myself.
I kept looking for that elusive obscure feature (āof the week, eek, eekā) that would give a simple reportāsomething very much like Copy Info for Selected Links in the Links panel menu. If itās there, I sure couldnāt find it.
So whatās the first thing a creative pro should think when thereās something that your software should be able to do but doesnāt? You guessed it: āMaybe thereās a script for that.ā
A little web sleuthing brought me to a deep link to a page on the Adobe Support Communityās InDesign section, where a member had posted some not-quite-working code for a āscript to extract hyperlinks from InDesign file with page number.ā
Manan Joshi came to the rescue! The InDesign Automation and Plugin development consultant, a prolific contributor to the Adobe discussions, had responded to the original poster with modifications to create a tiny script that did exactly what the original user neededāand what I also needed at that moment.
āI feel good that the information helped you out and that in itself is a very satisfactory feeling,ā Manan replied when I wrote him to make sure I was attributing the authorship of the script properly.
A crowbar for your hyperlinks
The script is simple, but you will need to give it a nameāI used āhyperlinksāāand save it as a text file with the extension .jsx. Follow these instructions to install it.
Open your document, run the script, and it will display a dialog box with all the links.Ā

Click āOK,ā and that data will be saved into a text document, which you can then use with abandon.

I was able to do a quick search and replace in BBEdit to add a tab before the URL so I could paste the whole list into Excel in column form. Maybe you would need a list like this to very easily construct SQL queries or build full HTML source code around these links.
The point is, if you ever need this information, you will have a very specific reasonāand this simple solution will give you the digital crowbar you need to get your links out of InDesign.
A big shout out to Manan Joshi and the pros who hang around these discussions. They give so much of themselves and their time to the InDesign user community.
Commenting is easier and faster when you're logged in!
Recommended for you
A Script to Align Dashed Strokes to Corners in Photoshop
This free script solves the problem of sloppy-looking corners when you use dashe...
What Good Are Free Fonts?
How to tell if a font is trash or treasure, regardless of its cost.
InDesigner: Raphaƫl Freeman
Addison Lalier shows how one designer has mastered the complex layouts and types...
