Overview
GREP Batch Processor is a free script for Adobe InDesign that runs many saved GREP Find/Change queries in one go, in the order you choose. It is made for book designers, typesetters, and anyone who runs the same cleanup on every manuscript.
What it does
- Finds all GREP queries you saved in InDesign’s Find/Change dialog
- Lets you pick queries and set the order they run in
- Saves your selection as a preset you can run again later
- Shows how many matches each query finds before anything changes (Preview)
- Runs the whole batch as one step that a single Undo reverts
- Works on the whole document, the current story, or the selected text
- Can save a dated backup copy of the document before each run
The problem it solves
Cleaning a book usually means dozens of Find/Change operations: spaces, dashes, quotes, styles, imported Word leftovers. Running them one by one is slow, easy to get wrong, and hard to repeat the same way on the next book. The script turns that list into one click.
Key features
| Feature | What it means |
|---|---|
| Batch run | Run any number of saved GREP queries in one operation |
| Order control | Number the queries; they run from the lowest number up |
| Presets | Save a query set per client, series, or document type |
| Preview NEW 5.10 | Count the matches per query without changing the document |
| One-step undo NEW 5.10 | One Ctrl+Z reverts the whole batch |
| Run on NEW 5.10 | Document, current story, or selected text |
| Search options | Footnotes, master pages, hidden and locked layers, locked stories |
| Backups | Dated copy of the document before each run, in the same folder or a _backups subfolder |
| Finds your queries | Every language and edition, including CJK (-J) and Middle East (-ME) IMPROVED 5.10 |
| Filter | Type to find a query in a long list |
Requirements
| Requirement | Details |
|---|---|
| Adobe InDesign | InDesign 2020 and newer |
| Operating system | Windows 10 or 11, macOS 10.14 or newer |
| Saved GREP queries | At least one query saved in Find/Change (GREP tab, Save Query) |
You should also know what your queries do. The script runs exactly what you saved, so a query that is wrong once is wrong everywhere.
Installation
1. Open the Scripts folder
- In InDesign, open Window, Utilities, Scripts
- Right-click the User folder
- Choose Reveal in Explorer (Windows) or Reveal in Finder (macOS)
The folder is usually here:
Windows: C:\Users\[you]\AppData\Roaming\Adobe\InDesign\Version [XX].0\[language]\Scripts\Scripts Panel\ macOS: ~/Library/Preferences/Adobe InDesign/Version [XX].0/[language]/Scripts/Scripts Panel/
2. Copy the script
Copy GREPBatchProcessor_v5.10.jsxbin into that folder. It appears in the Scripts panel right away, no restart needed. If you have an older version, you can delete it; your presets and settings stay in the same folder and keep working.
3. Run it
Open a document and double-click the script in the Scripts panel.
The window
| Part | What it is for |
|---|---|
| Queries tab | Filter, pick, and number queries; set search options and Run on; save a preset |
| Run Preset tab | Pick a saved preset, see its queries and settings, run it |
| Help tab | Short guide, credits, links to this site and to Barcode Rocket |
| Settings tab | Your own GREP folder, backup options, presets folder |
| Bottom bar | Leave feedback, Cancel, Preview, Run |
Working with queries
The query list
The list shows every saved GREP query the script found, with its order number (#) next to it. Type in Filter to narrow a long list. You can select several queries at once.
Setting the order
- Select one or more queries
- Click Auto # to number them in list order, or type a number in Set # and click Apply
- Clear removes all numbers
Only queries with a number run. They run from the lowest number to the highest. Order matters: a query that changes dashes can change what the next query finds.
Search options
| Option | Effect |
|---|---|
| Run on NEW 5.10 | Document, Story (where the cursor is), or Selection |
| Use query’s own settings | Use the scope saved inside each query instead of the options below |
| Footnotes | Include footnote text |
| Master Pages | Include master (parent) pages |
| Hidden Layers | Include text on hidden layers |
| Locked Layers | Include text on locked layers |
| Locked Stories | Include locked stories |
Preview and undo NEW 5.10
Preview
Click Preview to count the matches of every numbered query without changing anything. The results window shows each query with its number of matches, then you return to the main window to run or adjust.
A query with 0 matches is either not needed for this document or not written the way you think. Better to find out before the run.
One-step undo
The whole batch is recorded as one step. If you don’t like the result, one Ctrl+Z puts the document back as it was before you clicked Run.
Presets
A preset saves the selected queries, their order, and the search options. Use them for book series, clients, or document types.
Save a preset
- Number the queries you want
- Type a name in Save Preset and click Save
Run a preset
- Open the Run Preset tab and choose a preset
- Check the list of queries and the saved scope
- Keep Use saved preset settings, or switch it off to override them
- Click Run Preset
Presets are small files in the GREP_Presets folder next to the script (Settings, Open Presets Folder). You can copy them to a colleague. Since 5.10 they are read safely: a preset file can only contain data, never code.
Backups
Before a run, the script can save a copy of your document. Choose in Settings:
- Location: same folder as the document, or a
_backupssubfolder - Always create backup: without asking each time
- Delete backup if no changes made: keeps your folder clean
Since 5.10 every backup gets the date and time in its name (for example Chapter-03_backup_2026-10-08_153012.indd), so earlier backups are never overwritten. The document is saved before the copy is made.
Troubleshooting
“No saved GREP queries were found automatically”
The script looks in InDesign’s own presets and in every preferences folder for your InDesign version, including CJK and Middle East editions (Version 19.0-J, Version 19.0-ME). If it still finds nothing, it asks you to choose the folder with your saved queries and remembers it. You can change it later in Settings, GREP Queries Folder.
Settings, Show All Scanned Folders lists the folders where queries were found.
A query shows ERROR in the results
InDesign can only load queries from its own Find-Change Queries folders. A query that exists only in a custom folder may be listed but fail to run. Copy it into InDesign’s GREP queries folder (below) and it will work.
“No queries selected”
Only queries with an order number run. Select queries and click Auto #, or set numbers with Set # and Apply.
The script runs slowly
Long documents and complex patterns take time. Use Preview to drop queries with no matches, run on a story or selection to test, and keep each query focused on one task.
Where InDesign keeps saved GREP queries
Windows: C:\Users\[you]\AppData\Roaming\Adobe\InDesign\Version [XX].0\[language]\Find-Change Queries\GREP\ macOS: ~/Library/Preferences/Adobe InDesign/Version [XX].0/[language]/Find-Change Queries/GREP/ CJK and Middle East editions use "Version [XX].0-J" or "Version [XX].0-ME".
Feedback and support
After a run, the results window has two buttons: Worked great and Report a problem. There is also Leave feedback in the main window. They open this website in your browser with the form ready, and add the script version, your InDesign version, and your system to the link so a problem can be reproduced. Nothing is sent unless you click and submit the form.
You can also write to feedback@autolayoutai.com.
Why .jsxbin
.jsxbin is Adobe’s own binary format for InDesign scripts, made with Adobe’s ExtendScript tools. InDesign runs it exactly like a .jsx file.
The script took hundreds of hours to build and test. The binary format protects it from being copied and resold by people who didn’t make it, while it stays free for you.
Is it safe?
- It runs only on your computer
- It never connects to the internet on its own. The feedback buttons only open your browser when you click them
- It only runs the Find/Change queries you saved yourself
- It has been downloaded and used by hundreds of designers
For a security or compliance review of the source code, write to feedback@autolayoutai.com.
Best practices
- Test every new query in InDesign’s Find/Change before adding it to a preset
- Use Preview before running a new preset on a real book
- Keep one task per query and name it clearly, for example
03 Em dash spacing - Order from general to specific: spaces and returns first, styles last
- Keep backups on for important documents
Credits
| Who | Contribution |
|---|---|
| Jean-Claude Tremblay | Locale mapping that makes international versions work |
| Mohammad Hasanain | Inspiration from “Show GREP Queries”, testing and ideas |
| Theunis de Jong | The late author of IndyFont, used to make the font that shows InDesign hidden characters on this website. Used with the kind permission of Marc Autret, indiscripts.com |
| InDesign community | Testing, feedback, and feature requests |
Resources
- Adobe InDesign scripting guide and ExtendScript documentation
- GREP in InDesign, by Peter Kahrel
- The CreativePro (InDesignSecrets) community
About the author
Legal disclaimer and trademarks
Trademarks
Adobe, InDesign, and Creative Cloud are registered trademarks of Adobe Inc. in the United States and/or other countries. macOS is a trademark of Apple Inc. Windows is a registered trademark of Microsoft Corporation.
GREP Batch Processor is an independent project and is not affiliated with, endorsed by, sponsored by, or in any way officially connected with Adobe Inc., Apple Inc., Microsoft Corporation, or any of their subsidiaries or affiliates.
Use at your own risk
By downloading and using GREP Batch Processor, you agree that:
- You use the script entirely at your own risk
- The author makes no warranties, express or implied, about its functionality, reliability, or fitness for any purpose
- The author is not responsible for any damage, data loss, file corruption, or other issues resulting from its use
- You are responsible for backing up your documents before running batch operations
- You should test the script on non-critical documents before using it on important work
No warranty
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Limitation of liability
Under no circumstances shall the author be liable for any direct, indirect, incidental, special, consequential, or punitive damages arising out of or related to your use of this script, regardless of whether such damages arise from breach of contract, tort (including negligence), or any other legal theory, even if the author has been advised of the possibility of such damages.
License
GREP Batch Processor is free for personal and commercial use, and will stay free. The publishing community taught me a lot over the years; this is my way of giving back.
You may
- Use the script for any purpose, personal or commercial
- Share it with others
- Use it in client projects and commercial workflows
You may not
- Sell the script or charge money for it
- Remove the credits or claim authorship
- Redistribute modified versions as the original
Attribution
When sharing or mentioning the script: GREP Batch Processor 5.10 by Marko Markovic, autolayoutai.com.
Version history
5.10 (2026)
- Preview: count matches per query without changing the document
- One-step undo for the whole batch
- Run on Document, Story, or Selection
- Finds queries in CJK and Middle East editions (
Version XX.0-Jand-ME) and in every language folder - If no queries are found, asks for the folder instead of stopping
- Show All Scanned Folders lists the folders where queries were found
- Dated backup names, older backups are kept
- Presets and settings are read safely as data only
- Feedback buttons: Worked great, Report a problem, Leave feedback
- Help tab links to autolayoutai.com and Barcode Rocket
5.00 (2025)
- Four-tab window: Queries, Run Preset, Help, Settings
- Run Preset tab with preset preview
- Real-time query filter
- Improved locale detection and error handling
Download
Free for personal and commercial use. One .jsxbin file, 55 KB. Windows and macOS. By downloading you agree to the license and the legal disclaimer.