PAC and wpad.dat file statistics: what real proxy.pac files look like

How big is a typical PAC file? Which functions does it use? How often does it fail? Anonymous statistics from PAC files checked with this tester since 2025.

Do not parse
about 32%
Grade C or worse
about 75%
Typical size
about 4 kB
Typical length
about 80 lines

How these statistics are made

No PAC file and no file content is published here. The statistics consist only of logical metrics: size and length ranges, which functions a file uses, which rules found something.

  • Every figure is a rounded share. There are no counts, no names and no addresses.
  • When you check a file, the tester runs it in your browser. It does not send the file.
  • For the grade it sends only the file’s logical shape: no names, no addresses from your network, no text.
  • The shape is kept only if you agree to it when you ask for all findings.
  • Files that do not parse count only for the first figure below.
  • All figures are approximate and for information only.

About a third of the files do not parse

A browser cannot run such a file. It connects directly, without a message (PAC-E001). Common causes: a missing brace, code outside the function, a quote that is never closed. All further figures are about the files that parse.

Most PAC files are small

0%2%4%6%8%4.1%2.9%2.8%2%1.6%2.6%1.9%3.6%4%2.9%4.1%3.6%2.8%3.1%4.1%5.7%4.6%4.3%5.5%6.3%3.9%6.4%3.5%1%2.6%3.1%3.3%1.2%1.6%0.4%0.4%100 B1 kB10 kB100 kB1 MBmedianfile size (logarithmic scale; under 100 B in the first bar)
File size: share of files per range
0%5%10%15%20%15.1%2.4%2.6%4.8%4.4%3%6.3%3.9%6.2%4.6%3.7%3.9%8.4%5.1%4.4%5.4%2.4%4.6%3.8%2.1%1.3%0.7%0.5%0.2%101001000medianlines (logarithmic scale; under 10 in the first bar)
Length: share of files per range

A typical file has about 4 kB and 80 lines. A few files are long lists of exceptions.

0%5%10%15%20%25%30%27.7%13.9%7.4%6.9%6.3%4.3%2.6%3.9%4.2%3.4%4.9%2.8%2.5%0.6%0.8%0.8%1.4%0.5%0.9%0.5%1%1.1%0.1%0.1%0.1%0.2%0.2%0.1%0.3%0.1%0%25%50%75%100%mediancomments as share of the text
Comments: share of files per range

Most files contain comments. In a typical file they are less than a tenth of the text.

Most files name one or two proxies

0%10%20%30%40%50%10.1%44.5%16.3%4.9%8.7%1.5%1.8%2.6%2.2%1.3%0.2%0.9%0.6%0.8%0.2%0.1%0.1%2.2%0.1%0.1%0.1%0.7%051015202530+mediannumber of different proxies (0 = none written out; 30 = 30 or more)
Different proxies named in the file: share of files per range
0%5%10%15%20%25%20.1%15.3%13%12.9%6.4%6.8%4%1.2%1.7%2%1.1%0.5%0.2%0.3%0.1%0.2%0.5%0.2%0.1%0.1%0.8%0.4%0.9%0.4%0.1%0.1%0.4%0.5%0.2%0.6%0.3%0.1%0.3%0.1%0.3%0.1%0.1%0.3%7%0255075100+medianif statements per file (100 or more in the last bar)
if statements per file: share of files per range

shExpMatch does most of the work

  • shExpMatch() is in about four of five files.
  • isInNet() and dnsResolve() are common. With a host name, both wait for a DNS lookup (DNS in PAC files).
  • The date and time functions are almost never used. On Windows, dateRange() and timeRange() are always false (details).
  • The Microsoft Ex functions are very rare.

How the files are written

The file …Share
Returns a list with a fallback (two proxies, or a proxy and DIRECT)64%64%
Uses a regular expression28%28%
Applies shExpMatch to url (not host)28%28%
Lower-cases the host name20%20%
Contains a loop17%17%
Contains a list (array)16%16%
Defines its own helper functions14%14%
Never returns anything but DIRECT5%5%
Uses a switch statement4%4%
Uses let, const, arrow functions or template strings2%2%
Uses the HTTPS keyword (TLS to the proxy)1%1%
Uses a SOCKS proxy1%1%
Defines FindProxyForURLEx (Windows IPv6 entry point)under 1%0%

Only about one file in five lower-cases the host name. Windows services pass it as typed (PAC-K009).

Three in four files get a C or worse

GradeShare of the files that parse
A+1%1%
A1%1%
A-15%15%
B8%8%
C38%38%
D7%7%
E26%26%
F4%4%

The most common mistakes

MistakeShareRules
Host compared without lower-casing it first73%73%PAC-K009
A DNS lookup before the rules that need none52%52%PAC-P001, PAC-P002
A host pattern that also matches look-alike domains49%49%PAC-X002, PAC-X003, PAC-X004, PAC-X009
Throws, returns nothing or an invalid value for some addresses38%38%PAC-E006, PAC-E011, PAC-X001, PAC-E010
Route depends on myIpAddress()26%26%PAC-K013
The same condition twice26%26%PAC-C013
An IP range matched as text or with the wrong mask22%22%PAC-X006, PAC-C007
A host pattern applied to url18%18%PAC-C001

Each mistake and its fix: common PAC file mistakes. To check your own file, use the PAC file tester.

Frequently asked questions

How big is a typical PAC file?

About 4 kB and 80 lines. Most PAC files are smaller than 20 kB. A few are very long lists of exceptions.

Which PAC functions are used most?

shExpMatch, in about four of five files. Then isInNet, isPlainHostName, dnsDomainIs and dnsResolve. The date and time functions are almost never used.

How often do PAC files contain errors?

About a third of the checked files did not parse. Of the others, three in four got a grade of C or worse.

Is my PAC file part of these statistics?

No file and no file content is published. The page shows only logical metrics as rounded shares - no names, no addresses, no counts. When you check a file, the tester runs it in your browser and does not send it. Only the file's logical shape is sent, with no names, no addresses from your network and no text, and it is kept only if you agree to it when you ask for all findings.

Last updated: