.PAC

PAC File

Proxy Auto-Config File
Ask a question
QUICK ANSWER

A PAC file (Proxy Auto-Config) is a small JavaScript file that tells your browser or OS which proxy server to use for each URL, or whether to connect directly. To read or edit it, open it in any text editor - it is plain text. To use it, enter its URL or path in your browser or OS proxy settings under "Automatic proxy configuration.

Developer: Netscape Communications (original author of the PAC standard, 1996) Category: Web Files Open standard MIME: application/x-ns-proxy-autoconfig
OPENS ON Windows macOS Linux

On this page

19k+ extensions indexed
Last reviewed Jun 20, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the PAC file format?

A .pac file, also known as a Proxy Auto-Config file, is a configuration file used by web browsers and operating systems to automate proxy server connection settings. The .pac file contains a single JavaScript function - FindProxyForURL(url, host) - that specifies which connection mode to use when a browser needs to access a given URL. The function can return DIRECT (connect without a proxy), PROXY host:port (route through an HTTP proxy), or SOCKS host:port, and multiple directives may be chained with semicolons as fallbacks.

The format was introduced by Netscape Communications in 1996 and has remained the de-facto standard for proxy auto-configuration ever since. Because a .pac file is plain JavaScript, it can use built-in PAC helper functions - isInNet(), dnsDomainIs(), shExpMatch(), dnsResolve(), and others - to build complex per-URL routing logic. Extended functions such as isInNetEx() added around 2010 provide IPv6 support.

.pac files are plain text and can be created or edited in any text editor on Windows, macOS, or Linux. In enterprise and network environments they are often distributed automatically via the Web Proxy Auto-Discovery (WPAD) protocol, where the file is served under the well-known name wpad.dat - the same script content in a .dat wrapper. The browser fetches and executes the script each time it connects to a new host. All major browsers - Chrome, Firefox, Edge, and Safari - support .pac files on Windows, macOS, Linux, iOS, and Android.

Security & safety

RISK: MEDIUM

A PAC file is not executable on your system the way a program is - it runs only inside the browser's restricted PAC engine. But it IS security-relevant: because it decides where ALL your web traffic is routed, a malicious or tampered PAC can silently send your traffic (including bank logins) through an attacker's proxy for interception. Unexpected "automatic proxy configuration" settings or a planted .pac/wpad.dat are recognized malware indicators. Only apply PAC files from your own IT department or a source you trust, inspect the FindProxyForURL logic (it's readable plain text), and be wary of WPAD on untrusted networks, which can be hijacked.

Format details

in a nutshell
FULL NAMEProxy Auto-Config Fileaka PAC file, Proxy Auto-Configuration script
DEVELOPERNetscape Communications (original author of the PAC standard, 1996)since 1996 (Netscape Navigator 2.0 proxy auto-config)
CATEGORYWeb Files
MIME TYPEapplication/x-ns-proxy-autoconfig
TYPEPlain-text JavaScript file defining one function, FindProxyForURL()
STANDARDOpen · royalty-free
This extension is also used by…
  • Atari STAD image (PackBits) - Obscure compressed bitmap image format from the Atari ST 'STAD' paint program.
  • SAMS ARchive (.pac) - Compressed archive created by the SAMS ARchiver packing utility.
  • Tencent QQ data file - Internal data/resource file used by the Tencent QQ messenger.

Programs that open PAC files

Windows2 apps
Notepad / VS Code (edit) Free Right-click → Open with → Notepad (or VS Code) to read/edit the JavaScript. To USE it: Settings → Network & internet → Proxy → 'Use setup script' → enter its URL/path.
Web browser (apply, not view) Free In the browser/OS proxy settings choose 'Automatic proxy configuration URL' and point it at the .pac - the browser runs it, it doesn't display it.
macOS2 apps
TextEdit / VS Code (edit) Free Open in TextEdit/VS Code to read or edit. To USE it: System Settings → Network → Proxies → 'Automatic Proxy Configuration' → enter the file/URL.
Safari (apply via System Settings) Built-in Safari uses the system proxy; set the PAC under System Settings → Network → Proxies.
Linux2 apps
Any text editor (edit) Open-source Edit with nano/gedit/VS Code. Apply via the desktop's network proxy settings ('Automatic' → PAC URL) or per-app (e.g. GNOME Settings → Network → Proxy).
Firefox (apply) Open-source Settings → Network Settings → 'Automatic proxy configuration URL' → enter the .pac location.

Technical details

deep spec
File typePlain-text JavaScript source file
Core functionFindProxyForURL(url, host) - the single required entry point the browser calls for each connection
MIME typeapplication/x-ns-proxy-autoconfig (also accepted: text/plain, application/x-javascript-config)
Text encodingASCII / UTF-8
Typical file sizeUnder 5 KB; large enterprise scripts may reach tens of KB
Binary signatureNone - identified by the presence of the FindProxyForURL() function declaration
Return value syntaxDIRECT, PROXY host:port, or SOCKS host:port; multiple directives chained with semicolons for fallback
Built-in helper functionsisInNet(), dnsDomainIs(), shExpMatch(), dnsResolve(), myIpAddress() and related PAC utilities
IPv6 extensionisInNetEx(), isResolvableEx() and other Ex-suffixed helpers added ~2010 for IPv6 address matching
WPAD integrationServed as wpad.dat under the Web Proxy Auto-Discovery (WPAD) protocol for network-wide auto-distribution
Distribution methodBrowser or OS fetches the file via an HTTP/HTTPS URL configured in system or browser proxy settings
Execution contextRestricted JavaScript sandbox - no DOM access, no arbitrary network calls; only PAC helper functions permitted
Supported platformsWindows, macOS, Linux, iOS, Android - any OS or browser that supports proxy configuration
Well-known filenamesproxy.pac (direct URL config) and wpad.dat (WPAD auto-discovery)
Released1996 (Netscape Navigator 2.0 proxy auto-config)
Latest versionDe-facto stable since 1996; Microsoft added IPv6 helper functions (ex versions) ~2010
Open standardYes · royalty-free
Specificationdeveloper.mozilla.org

PAC conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with PAC files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about PAC files.

Frequently asked questions

What is a PAC file?
A Proxy Auto-Config file - a small JavaScript file with one function, FindProxyForURL(), that tells your browser or OS which proxy server to use for each website (or to connect directly).
How do I open a PAC file?
To read or edit it, open it in any text editor (Notepad, TextEdit, VS Code) - it's plain text. To actually USE it, enter its URL/path in your browser or OS proxy settings under 'Automatic proxy configuration'.
How do I edit a PAC file?
Open it in a code editor and modify the FindProxyForURL function - add domains, change the proxy host:port, or return 'DIRECT' for sites that should bypass the proxy. Test before deploying; a syntax error breaks proxying.
Why is a PAC file blocking some websites?
The PAC's logic is routing those URLs to a proxy that's down or denying them. Inspect FindProxyForURL to see which rule matches, or temporarily switch your proxy setting to 'No proxy' to confirm the PAC is the cause.
Is a PAC file dangerous?
It can be. A malicious PAC can reroute all your traffic through an attacker's proxy. If you find an unexpected proxy auto-config setting or .pac file you didn't add, treat it as a possible compromise and remove it.
What's the difference between a PAC file and wpad.dat?
Same format. A .pac is a PAC file you point at manually; wpad.dat is the identical content served at a well-known name so clients find it automatically via the WPAD protocol.

References

1MDN - Proxy Auto-Configuration (PAC) filedeveloper.mozilla.org
2Microsoft - Use a setup script / automatic proxy configurationlearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.EXEWindows Executable (Portable Executable)
5.M4AMPEG-4 Audio File
6.MDMarkdown Document
7.DATProgram Data File (generic)
8.BINCD/DVD Disc Image (BIN/CUE)
9.JSONJavaScript Object Notation file
10.NOMEDIAAndroid No-Media Marker File

Related extensions

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z