Find and replace items using queries

Last updated on Jun 2, 2026

Learn how to use saved queries to automate everyday find-and-replace operations in Adobe InDesign.

Queries are predefined find-and-change operations that automate repetitive tasks. InDesign includes preset queries for tasks like converting phone number formats, standardizing punctuation, and fixing typographic issues. Use queries when you need to apply the same find-and-replace operation across multiple documents or repeat searches frequently.

Apply an existing query

Select Edit > Find/Change.

Select a query from the Query list. After selecting a query, you can adjust the search criteria in the Find what and Change to fields to fine-tune results.

Select your search scope from the Search menu: Document, All Documents, or Story.

Select Find Next to locate the first instance.

Select Change, Change All, or Change/Find.

Convert phone numbers with a preset query

Use this Phone Number Conversion query to standardize phone number formats throughout your document.

Select Edit > Find/Change and verify the GREP tab is active.

Select Phone Number Conversion (dot format) from the Query list.

Review the GREP expression in the Find what field:

\(?(\d\d\d)\)?[-. ]?(\d\d\d)[-. ]?(\d\d\d\d).

Modify the Change to field to format numbers as needed.

For example, $1.$2.$3 for 206.555.3982, $1-$2-$3 for 206-555-3982, or $1 $2-$3 for 206 555-3982.

Select Change All.

Saved queries let you rerun and share complex searches by storing text and formatting settings in the Query list of the Find/Change dialog box. You cannot save the search range with a query, so specify the range each time you run it.

Save a custom GREP query

Select Edit > Find/Change.

Select Text or GREP to perform the search you want.

Construct your search expression in the Find what field using GREP syntax or Special characters for search .

Enter replacement text or patterns in the Change to field.

Configure any format settings using Specify attributes to find icon and Specify attributes to change icon.

Select options such as Include Locked Layers and Locked Objects (Find Only) icon, Include Locked Stories (Find Only) icon, or Include Footnotes icon as needed.

Select the Save Query icon and enter a name for your query.

Select OK.

Run a saved GREP query

Select Edit > Find/Change, then select the GREP or Text tab.

Select your query from the Query drop-down menu.

Specify a search range from the Search drop-down menu (Document, All Documents, or Story).

Select Find Next to locate the first match.

Select Change, Change All, or Change/Find to replace text and continue searching.

Delete a saved query

Select Edit > Find/Change.

Select the query you want to remove from the Query list.

Select the Delete Query icon.

Note

Custom queries are stored as XML files in your user preferences folder. The names of customized queries appear in the Query drop-down menu in the Find/Change dialog box.

  • macOS: Users/<username>/Library/Preferences/Adobe/InDesign/<Version>/<Language>/Find-Change Queries/<query type>
  • Windows: Users\<username>\AppData\Roaming\Adobe\InDesign\<Version>\<Language>\Find-Change Queries\<query type>