Make hyperlinks from URL

Script for InDesign (written and tested in CS6, Windows). Version 1.0

Select some text or select nothing to process the whole document.

Before (without angle brackets)

After (without angle brackets)

Before (with angle brackets)

After (with angle brackets)

Temporary colors — green and red — visually indicate successfully created and failed hyperlinks. After running the script, they can be deleted from the "Swatches" panel.

Note: this script was written according to some particular requirements so it may not work for all possible URLs. You may need to add more domain names here:

I couldn't find a magic GREP-expression working for all URLs.

Click here to download the script. From here you can download test documents you see in the screenshots above to test the script (CS6, about 1Mb).