How to open .BR files on Windows

To open .BR files on Windows, if the file is part of a website (e.g., "app.js.br"), rename/copy it only if needed and plan to decompress it (it is not meant to be opened directly).

Step-by-step instructions

  1. If the file is part of a website (e.g., "app.js.br"), rename/copy it only if needed and plan to decompress it (it is not meant to be opened directly).
  2. Install and use a Brotli-capable tool (for example, the Google Brotli command-line utilities from the brotli project) to decompress the .br into the original file.
  3. Open the decompressed output (such as .js, .css, .html, or .wasm) with the appropriate editor or viewer.

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