PDF Editing Issues

Format PDF Form Percentages to Two Decimal Places in Adobe Acrobat

Natalie TaylorNatalie Taylor Nov 19, 2026 869 views

Question details

Display a numeric PDF form value as a percentage with exactly two decimal places.

Format PDF Form Percentages to Two Decimal Places in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form field needs to display an entered value such as 8 as 8.00%.
Observed behavior
The desired format adds two decimal places and a percent sign without multiplying the entered value.
Before you start

Open the PDF in Adobe Acrobat with access to the Prepare a form tool. Identify the numeric text field you want to format and confirm that users will enter numbers without a percent sign.

Solution 1Recommended

Add a custom percentage format script in Acrobat

Use a custom field format to display an entered number with two decimal places and a percent sign.

This script treats the entered number as the percentage value: 8 displays as 8.00%. It does not multiply the value by 100.

1
Open the form editor

In Acrobat, open the PDF and select All tools > Prepare a form.

2
Open the field properties

Double-click the text field you want to format, then select the Format tab in its properties.

3
Choose a custom format

Under Select format category, choose Custom, then click Edit next to Custom Format Script.

4
Enter the script

In the JavaScript editor, enter: var x = Number(event.value); if (event.value) event.value = x.toFixed(2) + "%"; Then click OK and close the field properties.

5
Test the field

Exit form editing or select Preview, enter 8 in the field, and move to another field. The value should display as 8.00%. Save the PDF.

Add a custom percentage format script in Acrobat
Enter numeric values: The script expects numeric input without a percent sign. For example, 0.08 displays as 0.08%, not 8.00%.
Free Microsoft Office alternative

Work with PDF and Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDF and Office documents. Its format compatibility helps make the move from Microsoft Office straightforward; use Adobe Acrobat for the custom PDF form JavaScript described above.

Open and view PDF forms alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXFamiliar interface for a smooth transition from Microsoft OfficeFree, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Where do I add the percentage script in Acrobat?

Open All tools > Prepare a form, double-click the field, and select Format > Custom. Click Edit next to Custom Format Script and paste the script there.

Will entering 0.08 display 8.00%?

No. The script adds decimal places and a percent sign without multiplying by 100, so 0.08 displays as 0.08%. Enter 8 to display 8.00%.

Why does the field show NaN%?

The value may contain text or a percent sign that Number() cannot convert. Enter a number such as 8 without the percent sign, then move to another field.

Can I add this script in Acrobat Reader?

Adding a custom form field script requires Acrobat with access to form editing. Open the PDF in Acrobat and use Prepare a form to edit the field properties.