URL-to-hyperlink conversion done properly – links, spacing and all…
Working on a publication in InDesign with long URLs (website addresses) and trying to convert those URLs to live hyperlinks with InDesign’s inadequate URL-to-hyperlink “feature” can reduce the brave to tears. Only the shortest URLs are converted (why?!), and there is no help at all in fixing the horrendous line spacing resulting from long, unbreakable URLs!
Hyperlink Pro will convert all URLs, no matter how long they are, into clickable hyperlinks. What’s more, it will break long URLs optimally, providing the smoothest possible line spacing! It will also get rid of those pesky hyphens that screw things up when the document is exported to PDF! Let Hyperlink Pro save you and your team time and energy for more important challenges!
HyperlinkPro, like all Id-Extras add-ons, works with InDesign InDesign 2022 on both Windows and Mac computers. It also works with all versions of InDesign down to CS5.
Unlike some plugins, after using this add-on you can still share your documents with anyone, even if they don’t have it themselves. They will not get a “missing plugin” warning when opening the document because using this add-on leaves no traces!
Installing this add-on them will not take up any InDesign resources except when you are actively using it! As soon as it finishes its job (usually a matter of a few seconds), it relinquishes all control and power back to InDesign!
Have a look at the text below. It contains very long, badly spaced website addresses.
If InDesign’s “Convert hyperlink” feature is run on this text it completely ignores these long website addresses.
When Hyperlink Pro is run on this text, the entire website address is converted into a live hyperlink (so when the document is exported to ePub, PDF or other electronic format it becomes a clickable link).
What’s more, notice how Hyperlink Pro has broken the long URL in the optimal places to ensure the smoothest and most natural looking paragraph spacing:
Hyperlink Pro will convert all the URLs in an InDesign document into hyperlinks without skipping the hard ones! And it will ensure perfect spacing throughout!
Hyperlink Pro is also smart enough to know that google.com is a website, but google.pdf is not, unlike InDesign’s rather stupid implementation, which tries to convert anything that has a dot in it (such as file names) into a hyperlink. For all such “incomplete” URLs, Hyperlink Pro now allows you to set your desired prefix (http://, https://, or a custom prefix).
Incidentally, Hyperlink Pro follows the rules of the Chicago Manual of Style when setting line breaks for long URLs. As required, it avoids breaking a URL after the following characters: ~ . , – _ ? # % and /.
The current version complies with the 17th edition of the Chicago Manual. So it now allows breaks after a double-slash (//) but not after a single slash (/).
Click here to see Hyperlink Pro in action. (Note that the video shows an older version of Hyperlink Pro, so many of the new features are missing. But the essentials are still the same. Definitely worth watching!)
- New in version 2.1.8 (January 2022): To save your default preferences, do the standard InDesign thing: Run Hyperlink Pro with no documents open, set your preferences, and click Convert. The preferences you have chosen will now be used for all new documents.
- Converts all URLs in the document to hyperlinks, even the long ones that InDesign misses!
- Prevent breaks in the middle of URLs and allow them only after the special marks listed in the Chicago Manual.
- Choose to convert “incomplete” URLs, that is, URLs that do not contain the www part, such as google.com (instead of www.google.com).
- Optionally, breaks long URLs that span more than one line optimally, achieving the best possible line spacing. No more unsightly, super-wide spaces!
- Choose whether to convert the entire document or just one story or just the text selected.
- Optionally apply a character style to all converted URLs.
- Convert email addresses to email links!
- Convert phone numbers to telephone links that can be tapped to dial (US and Canadian phone numbers only, for now).
- Add a custom prefix to incomplete hyperlinks!
- NEW! Extra fine-tuning of line breaks. When the URL is too long to fit on a single line, you now have 3 choices: (1) Only break the line at the allowed punctuation; (2) Break the line anywhere, but avoid breaking up syllables; or, for best spacing (but possibly awkward line breaks) (3) allow the line to break wherever needed for optimal spacing.
Tips, Tricks, and Known Limitations
- Although Hyperlink Pro is far better than InDesign’s own hyperlink converter, it may be that some special URLs in the document are missed. 99% work fine though, with perhaps a small number of “false positives”.
- Hyperlink Pro finds the optimal line breaks for a long URL from a spacing point-of-view. It also respects Chicago Manual rules regarding which characters should never appear at the end of a line. However, from an editing/language point-of-view, you may want to (a) edit some of the line breaks (e.g. to avoid splitting words in two, etc.), or (b) prevent Hyperlink Pro from breaking URLs between alpha-numeric characters by selecting that option.
- To edit the line breaks set by Hyperlink Pro, cut the “discretionary line break” character from the end of the line, and paste it nearby in a preferable location. The video tutorial above shows how to do this.
- Hyperlink Pro includes a comprehensive internal list of legal TLDs (top-level domains). It uses this list to figure out that google.pdf is not a website, but google.com is!
- Phone number conversion works for US and Canadian phone numbers only (it adds a +1 country code to the number). Only the following 3 phone number formats are supported: 123-456-7890 or (123) 456-7890 or 123.456.7890. If you need different country phone numbers or different formats, please contact us.
The heart of this script is a very clever, very long RegExp (regular expression) created by John Gruber that homes in on even the toughest URLs. The RegExp was originally posted on his blog here. A revised version is available here. John Gruber has placed the RegExp in the public domain. Kudos!
Hyperlink Pro is available in 2 editions:
Hyperlink Pro Free Edition works with InDesign documents up to 3 pages long only, but in every other way is identical to Hyperlink Pro. Click here to download Hyperlink Pro Free Edition.
Hyperlink Pro Unlimited Edition ($47) works with documents of any length.
To purchase the unlimited edition of Hyperlink Pro for only $47, click the “Buy Now” button. Your product and serial numbers will be available for instant download when you complete the purchase.
If you are not satisfied with Hyperlink Pro for any reason, simply let us know within 30 days of purchase for a full refund.