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
A typical file has about 4 kB and 80 lines. A few files are long lists of exceptions.
Most files contain comments. In a typical file they are less than a tenth of the text.
Most files name one or two proxies
shExpMatch does most of the work
| Function | Files that call it | |
|---|---|---|
shExpMatch() | 78% | |
isInNet() | 63% | |
isPlainHostName() | 58% | |
dnsDomainIs() | 45% | |
dnsResolve() | 42% | |
myIpAddress() | 26% | |
localHostOrDomainIs() | 18% | |
isResolvable() | 13% | |
alert() | 2% | |
dnsDomainLevels() | 1% | |
isInNetEx() | under 1% | |
timeRange() | under 1% | |
dnsResolveEx() | under 1% | |
myIpAddressEx() | under 1% | |
weekdayRange() | never | |
dateRange() | never | |
isResolvableEx() | under 1% | |
sortIpAddressList() | never |
shExpMatch()is in about four of five files.isInNet()anddnsResolve()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()andtimeRange()are always false (details). - The Microsoft
Exfunctions 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% | |
| Uses a regular expression | 28% | |
| Applies shExpMatch to url (not host) | 28% | |
| Lower-cases the host name | 20% | |
| Contains a loop | 17% | |
| Contains a list (array) | 16% | |
| Defines its own helper functions | 14% | |
| Never returns anything but DIRECT | 5% | |
| Uses a switch statement | 4% | |
| Uses let, const, arrow functions or template strings | 2% | |
| Uses the HTTPS keyword (TLS to the proxy) | 1% | |
| Uses a SOCKS proxy | 1% | |
| Defines FindProxyForURLEx (Windows IPv6 entry point) | under 1% |
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
| Grade | Share of the files that parse | |
|---|---|---|
| A+ | 1% | |
| A | 1% | |
| A- | 15% | |
| B | 8% | |
| C | 38% | |
| D | 7% | |
| E | 26% | |
| F | 4% |
The most common mistakes
| Mistake | Share | Rules | |
|---|---|---|---|
| Host compared without lower-casing it first | 73% | PAC-K009 | |
| A DNS lookup before the rules that need none | 52% | PAC-P001, PAC-P002 | |
| A host pattern that also matches look-alike domains | 49% | PAC-X002, PAC-X003, PAC-X004, PAC-X009 | |
| Throws, returns nothing or an invalid value for some addresses | 38% | PAC-E006, PAC-E011, PAC-X001, PAC-E010 | |
| Route depends on myIpAddress() | 26% | PAC-K013 | |
| The same condition twice | 26% | PAC-C013 | |
| An IP range matched as text or with the wrong mask | 22% | PAC-X006, PAC-C007 | |
| A host pattern applied to url | 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.