InDesign scripts


I’ve developed many custom Adobe InDesign and Illustrator scripts for customers large and small. If you find yourself banging your head against the wall wishing that InDesign or Illustrator could do such-and-such, or if you have a thorny workflow issue you’d like to solve, contact me and I’ll develop a script for you!

Here are 37 free scripts. If one of these scripts saves you a significant amount of time and effort, you can show your appreciation here.

Add hyperlink to selection from clipboard  
Copy a URL from a browser, and then in InDesign select some text or an object and run the script. The script will create a hyperlink to the URL that is on the clipboard and apply it to the selected text or object. The hyperlink will be added NOT as a shared destination, and, if the selection is text, the Hyperlink character style will be applied to the text. Last update: 8-8-2023

Add page buttons  
This script provides an automated method for adding “universal” page turning buttons to an InDesign file that will work in every type of output, on any viewing platform. Compatibility is ensured because the buttons are simply hyperlinks that point to specific pages of the document. Great for creating buttons for interactive PDFs that will work in the browser as well as on PDF readers on mobile devices. See this CreativePro blog post.

Apply table style clear overrides  
This script will allow you to apply a Table style to an InDesign table, and all the Table formatting defined in the Table style, including Cell styles and any Paragraph styles defined in those Cell styles will be accurately applied to the table, clearing out all style overrides. You can format an entire table with a single click, all the way down to formatting the text within the table’s cells with Paragraph styles. Last update: 11-14-2023

BalanceRaggedLines  
This script “exposes” a hidden feature of InDesign CS3 and newer: the ability to control how the Balance Ragged Lines feature works. By default, the Balance Ragged Lines feature will try to make the lines in the selection approximately the same length, favoring a longer first line and a shorter second line. With this script you can tell InDesign to favor a shorter first line and a longer second line, or to try to make all lines the same length. See the enclosed documentation and example files for more detailed information. Last update: 3-16-2023

Check document for accessibility  
Checks (and fixes) a document for accessibility. Specifically, prompts the user for a document title, maps paragraph styles to PDF and EPUB tags, checks images for Alt text, and more. Script concept and testing by Chad Chelius. See this CreativePro blog post. Last update: 6-15-2022

Check for duplicate form field names  
This script will examine the active document and alert you if there are any form fields that have identical names. Last update: 1-23-2024.

Check for flipped images  
This script will “preflight” the currently open file to see if any graphics have been flipped horizontally or vertically. If any flipped graphics are found, a report is created listing the flipped graphic filename, page number, and flip direction. See this CreativePro blog post.

Convert image to grayscale
Convert image to grayscale with background color  
This script provides a quick way to convert the appearance of a selected color image to grayscale, or a nice grayscale-on-color-background effect. Note that only the appearance of the image is changed. This script is intended for use in presentations, digital documents, and the like. The resulting image is not true grayscale, and won’t print correctly to 4-color CMYK separations. See this CreativePro blog post.

Create angled table heads  
This script will create angled (15°, 30°, 45°, 60°) table heads for the selected table. The contents of the heads can be extracted from the first row of the table, or you can type your own column labels after the script has run. See this YouTube video. Last update: 1-30-2023

Cycle through blend modes  
Cycle through all the blend modes in order, applying them in turn to the selected object(s). Most useful if you apply a keyboard shortcut to the script. If you apply the Shift+plus/Shift+minus shortcuts, you can mimic the behavior of Adobe Photoshop. See this CreativePro blog post. Last update: 5-20-2021

Export FXL HTML  
This script will export non-facing pages InDesign files to “fixed layout” HTML format. That is, HTML that retains the exact layout, typography, animation, and appearance from your InDesign layout. The resulting export is very similar to InDesign’s fixed layout EPUB export, but instead of producing a fixed layout EPUB, a folder of HTML, CSS, and JavaScript is produced. See this CreativePro blog post.

Export images for web  
Automatically export all the items that are added to the articles panel, (and, optionally all inline and anchored objects) as JPG and/or PNG images at specific pixel widths. See this CreativePro blog post. Last update: 5-24-2023

Export JPG  
These scripts make it easy to export a selection, a page, a range of pages, or an entire document to JPG format at a specific pixel dimension. See this CreativePro blog post.

Export PNG with dimensions  
This script will output the currently selected objects to PNG format, prompting you for the desired width or height in pixels. This script works in CS6 or later only.

Export selection as SVG  
This script will output the currently selected objects to SVG format, by copy/pasting the objects to Adobe Illustrator and using Illustrator to complete the export. Last update: 3-1-2023

InteractivePDFSpreads ON/OFF  
A simple script that implements an un-exposed feature of InDesign CS5. When you export a facing-pages layout using the Adobe PDF (Interactive) option, the facing pages always output as a spread. When you run the InteractivePDFSpreadsOFF script, all future Interactive PDFs exported from InDesign will output as single pages, not spreads. To restore the ability to export spreads to Interactive PDF, run the InteractivePDFSpreadsON script. See this CreativePro blog post.

Isometric Projection  
This set of scripts will automate the process of transforming flat InDesign artwork into an isometric or dimetric projection. This YouTube video demonstrates how it works. Last update: 5-2-2022.

Load numeral search into find-change  
Loads a large GREP string into the Find-Change dialog box that will let you search to ensure your document conforms to the common editorial convention of only spelling out numerals smaller than 10. See this CreativePro blog post. Last update: 9-28-2021

Package  
This simple script does the same thing as the File > Package command, with two differences: first, it doesn’t stop to alert you about preflight problems, and second, it doesn’t create the “instructions.txt” file. See this CreativePro blog post.

Paste and format URL  
This script will automate the process of creating visible URLs. Just copy a URL to the clipboard, choose an insertion point in your text, and run the script. See this CreativePro blog post.

Populate drop-down  
This script takes the pain out of populating the drop-down list items in form list boxes and combo boxes. Just select a list box or combo box, as well as a text frame that contains your list items, and run the script. The list/combo box will be populated with the list of items in the text frame. Last update: 6-20-2022

Remove numerals from form field names  
When you copy and paste a form field, InDesign adds a numeral to the end of the field name in order to keep the field names unique. This script simply trims off any numerals from the names of any form fields in the document. Last update: 1-23-2024

Remove shared destinations  
Whenever you create a hyperlink in InDesign, it defaults to creating a “Shared hyperlink destination.” This script will locate all the hyperlinks in the active document and remove the “shared hyperlink destination” attribute from each. See this CreativePro blog post. Last update: 9-15-2021

Remove units from clipboard contents  
This little script does one thing only: it removes any characters except for the numerals 0-9 and the decimal point from whatever is on the clipboard. This was created upon request from someone that routinely copied numbers from various panel and dialog box measurement fields and wanted to use the copied results in calculations in other programs, which didn’t require, and couldn’t handle, the measurement units included on the clipboard. If you routinely use this script, you’ll want to add a keyboard shortcut to the script using Edit > Keyboard Shortcuts to make it more convenient to run. Last update: 4-10-2023

Rotate selected characters  
This script will prompt you for a rotation angle, and then rotate the selected characters by the specified amount. See this CreativePro blog post.

Separate spreads  
This script will separate the pages in every two-page spread by 1/2 inch, by moving the right-hand page 1/2 inch to the right. This is useful for documents destined for print that may include a bleed on the spine, such as spiral-bound documents. See this CreativePro blog post. Last update: 6-21-2023.

Setup  
This script sets all of InDesign’s preferences and many panel options and view settings the way that I like them. You can edit the script to set the preferences to suit your workflow. See this CreativePro blog post. Last update: 10-21-2022.

Show all hidden spreads  
This script does one simple thing. It just turns off the InDesign 2024 “Hide Spreads” option for every spread in the document. This might simplify life for those working with long documents who want to ensure all spreads are displayed. To do this without a script requires selecting all the pages in the document and then choosing Layout > Pages > Hide Spreads and then Layout > Pages > Show Spreads.

Show-hide line breaks  
This little script will highlight any line break (soft return) characters in the active document. When the script is run again, it removes the line break highlight. The highlight is created using InDesign’s conditional text feature.

Select first frame in thread / Select last frame in thread  
Select a text frame that is part of a long set of threaded text frames, double-click the Select first frame in thread script, and the first frame in the thread will be selected. And of course the Select last frame in thread script selects the last frame. This can be useful for accessibility tasks, among other things. Particularly handy if you assign a keyboard shortcut to the scripts. Last update: 10-4-2023.

Select table column  
Place your cursor in a table cell, run this little script, and all the cells in the column will be selected except for any header or footer cells. Last update: 1-09-23.

Stroke every 5 rows  
This script will add a .5pt black horizontal stroke every 5 rows within a table selection. Yes, InDesign can automatically add strokes and fills to tables following an alternating pattern you define in the Table Options dialog box. But sometimes you need strokes to repeat at certain user-specified locations in a table, or after a table subhead in the middle of a table. This script lets you do this. This is a teaching script. Included are easy to follow instructions that will let you modify the script in many ways.

Toggle layer visibility  
This little script just toggles the visibility of a layer (which you specify) between visible and hidden. Most useful when you use Edit > Keyboard Shortcuts to assign a keyboard shortcut to the script. To specify the layer name that you wish the script to work with, edit line 8 of the script with any text editor, and save the file back out as a text-only file with the “.jsx” filename extension. Last update: 1-23-2024.

TransposeTwoCharacters (InDesign)  
InCopy has a command to transpose two text characters (Edit > Transpose), but InDesign doesn’t. This script fixes that. Just place the text cursor between two characters, and double-click on the script in the Scripts panel. Even better, use the Keyboard Shortcut editor to assign a keyboard shortcut to the script, so you can transpose two characters with a keystroke. See this CreativePro blog post. Last update: 1-20-2022.

TransposeTwoCharacters (InCopy)  
Here is a version for InCopy. Even though InCopy has a Transpose command, it doesn’t work to transpose certain characters, such as periods and quotation marks. This script will transpose any characters.

Update TOCs  
This script will automatically update any InDesign-generated tables of contents found in the active InDesign file. This script keeps you from having to turn to the table of contents page and select the table of contents to update it. And, this script will locate multiple table of contents, if present, and update each automatically. Last update: 1-12-2021