List and Export Acrobat PDF Form Field Names with JavaScript
Question details
List and export interactive PDF form field names for review or localization.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A user wants to review form field metadata and consider translating it.
- Observed behavior
- Acrobat JavaScript can enumerate field names and print them to the console for copying.
Open the PDF in Acrobat and confirm it contains interactive form fields. Make sure Acrobat JavaScript is enabled in Preferences before using the JavaScript console.
List and copy PDF form field names from the Acrobat JavaScript console
Use this method to review field names or copy them into a separate text file.
Open the form in Acrobat, then open the JavaScript Debugger console using Ctrl+J on Windows or Command+J on macOS.
Paste this script into the console: for (var i = 0; i < this.numFields; i++) { var fieldName = this.getNthFieldName(i); var field = this.getField(fieldName); if (field) console.println(field.name); }
Select the script and run it with Ctrl+Enter on Windows or Command+Enter on macOS. Select the printed names in the console and copy them into a text editor or spreadsheet.

Translate form tooltips and visible labels instead of field names
Use this approach when localizing the form for readers without changing its internal field names.
Review PDFs and Office files with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility makes it easy to move existing files into your workflow. Use Acrobat for the JavaScript field-enumeration task described above.

Frequently Asked Questions
How do I save the list of field names?
After running the script in Acrobat's JavaScript console, select and copy the printed names, then paste them into a text editor or spreadsheet and save the file.
Can the script import translated field names?
No. The script only lists existing names. Importing or renaming fields would require a separate method, and changes can affect scripts, calculations, and field relationships.
Why did the console return no field names?
Check that the open PDF contains interactive form fields and that JavaScript is enabled in Acrobat Preferences. A scanned or flattened form may have visible boxes but no interactive fields to enumerate.
What should I translate instead of internal field names?
In Prepare a form, open a field's properties and translate its Tooltip. You can also translate editable visible labels through Edit a PDF while keeping internal names unchanged.




