How to open .BR files on Mac

To open .BR files on Mac, if the .br appears as a web asset (like .css.br), treat it as compressed data that must be decompressed first.

Step-by-step instructions

  1. If the .br appears as a web asset (like .css.br), treat it as compressed data that must be decompressed first.
  2. Use a Brotli-capable decompressor (for example, the Google Brotli command-line utilities) to decode the .br file to its original form.
  3. Open the resulting file in the app that matches its real type (text editor for .js/.css, etc.).

Common issues

Decompression produces an unknown or extensionless file

A .br file is just compressed data; it may not include the original filename or extension, especially when it was created for web serving (e.g., "main.js.br" implies the output should be "main.js").

  1. Look at the original context or name (e.g., "style.css.br" should decompress to "style.css").
  2. After decompressing, add the correct extension based on what the file is (CSS/JS/HTML/WASM are common for web assets).

The file won’t open in a browser or editor

Trying to open the compressed .br directly will show garbled data because it must be decompressed first.

  1. Decompress the .br with a Brotli-capable tool (such as the official brotli utilities).
  2. Open the decompressed output with the appropriate program (text editor for source files, etc.).

Website serves a .br file as a download instead of loading normally

On the web, Brotli is meant to be delivered using HTTP content coding (Content-Encoding: br). If a server is misconfigured, it may serve the pre-compressed file as if it were the actual resource or omit the correct headers.

  1. If you manage the site, ensure Brotli is delivered as HTTP content coding "br" (Content-Encoding: br) rather than exposing the .br file directly.
  2. Verify the server sets appropriate headers and serves the original resource URL while using Brotli encoding for transport.

Security note

.br is compressed data; decompressing untrusted .br files can consume significant CPU/memory (a common risk with compressed inputs), so be cautious with very large or unexpected files.

Back to .BR extension page