Free tools Windows power users keep installed
One-click scans. No signup required.
To publish a Unity game online, create a Web build, then upload and serve the complete generated build output from a web server or hosting service. In Unity 6, start at File > Build Profiles > Web. Build and Run can preview the result locally, but a hosted URL is needed to make the game available to other people.
How do I build a Unity game for the web?
This workflow uses Unity 6. Older Unity tutorials may show File > Build Settings and a separate Switch Platform control; those labels and steps apply to older editor interfaces, so do not mix them with Unity 6’s Build Profiles workflow. Unity’s current Web build setup is documented in its Unity 6 Web build settings.
- Prepare the release content. Confirm which scenes and assets belong in the release, remove test-only content, and decide which browsers and devices you intend to support.
- Select Web. In Unity 6, open File > Build Profiles, select Web, and review the available Web settings, including browser selection, texture compression, development build, and code optimization.
- Choose settings for your goal. Use a development build when debugging or profiling. For a public release, select code optimization according to whether you need faster iteration, runtime speed, or a smaller build.
- Build to a named output location. Keep track of the directory containing the generated Web build files; that output, not the Unity project source, is what you deploy.
- Preview locally. Use Unity’s Build and Run workflow to preview the Web player through a local server. Opening the generated HTML file directly is not a dependable substitute: browser security rules can block local-file loading. See Unity’s Web build and run guidance.
Choose code optimization for the release goal
Unity 6 offers code optimization choices covering shorter build time, runtime-speed optimizations, runtime speed with link-time optimization, and disk-size optimization. A faster build can help during iteration; runtime-oriented settings favor execution speed, while disk-size optimization targets a smaller download. These are tradeoffs, not guaranteed performance or load-time improvements. Compare the resulting build on the project and devices you actually plan to support.
How do I publish a Unity Web build?
A Web build is a set of generated files, not a live website by itself. Upload the complete build output to a web server or hosting service and preserve its directory structure. Unity’s Web publishing documentation describes deployment and links to configuration examples for Nginx, Apache, and IIS.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
- Choose a server or hosting service. Make sure it can serve the generated files and configure it for the build’s compression format.
- Upload the full output. Transfer the entire generated build, not just the HTML entry page; required supporting files must remain available at their expected paths.
- Set compression response headers. If using native browser decompression, the server must return a matching
Content-Encodingheader for compressed files. Unity puts it plainly: “To let the browser handle decompression natively, you need to configure your web server to serve the compressed files with the appropriate http headers.” - Open the hosted URL and test it. Check the actual production address rather than relying only on a local preview.
Choose gzip, Brotli, or no compression
Unity’s Web Publishing Settings offer gzip, Brotli, and Disabled. The right choice depends on download size, build time, and what your server can configure.
| Format | Download size and build time | Server and browser considerations |
|---|---|---|
| gzip | Unity identifies gzip as a default option that builds faster than Brotli. | Unity describes it as natively supported across browsers over HTTP and HTTPS. For native decompression, configure the response header to match the compressed build. |
| Brotli | Generally produces smaller compressed files, but takes longer to compress. | Chrome and Firefox support native Brotli over HTTPS. Configure the corresponding response header when using native decompression. |
| Disabled | No compression is applied by the Web build compression setting. | There is no compressed payload from this setting that needs a matching compression response header. |
Unity also documents a JavaScript decompression fallback for cases where server-level decompression is not configured. See its compression and server configuration guidance. Avoid assuming that a build configured for one format will work correctly if the server sends different or missing headers.
Rank #2
Why does my Unity Web build fail to load?
Start by opening the hosted build in the browser’s developer tools and checking the console and network requests. The error often points to a mismatch between the generated files, server behavior, or target browser.
- The page opens but the player does not: confirm that all generated files were uploaded and that the server preserves their directory paths.
- Compressed files fail to decode: check the Web Publishing Settings compression format and the server’s
Content-Encodingresponse header. If they do not agree, configure the server appropriately or use Unity’s documented JavaScript fallback. - A local file will not load: serve it through Build and Run or another local web server rather than treating a directly opened HTML file as a reliable preview.
- The browser is unsupported: check whether it meets Unity’s Web requirements and test the actual project in the browsers you intend to support.
- The game starts but behaves poorly: test startup, input, audio, network behavior, and memory use on representative devices. A successful build or browser-capability check does not establish that a particular game performs well.
Which browsers and devices should I target?
Unity 6 lists desktop Web requirements that include a WebGL 2.0-capable, HTML5 standards-compliant, 64-bit browser with WebAssembly capability. The requirements page lists current versions of Chrome, Firefox, Safari, and Chromium-based Edge for desktop operating systems. Consult Unity 6 system requirements for the version-specific details.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallMobile browsers are a separate target: Unity’s system requirements list mobile browser requirements, but desktop compatibility does not establish that a game will behave or perform the same way on a phone or tablet. Features, memory use, input, and device hardware affect the result, so test the project on the actual target devices. The published requirements describe browser capabilities; they do not certify performance for an individual game.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

