Overview
Godot can export games to run in web browsers using HTML5 and WebAssembly. Web exports use the Compatibility renderer and can run on most modern browsers.Requirements
Browser compatibility
Godot web exports require:- WebAssembly support
- WebGL 2.0 (or WebGL 1.0 with GLES2)
- Modern browser (Chrome 57+, Firefox 52+, Safari 11+, Edge 79+)
The Compatibility renderer is automatically used for web exports. Forward+ and Mobile renderers are not supported in browsers.
Export templates
Ensure web export templates are installed:- Editor > Manage Export Templates
- Download templates for your Godot version
- Web templates are included in the standard template package
Creating web export preset
- Go to Project > Export
- Click Add… and select Web
- Configure export settings
Basic configuration
Export formats
Standard export
Creates HTML, WASM, and JS files:Progressive Web App (PWA)
Enable PWA features:Threading support
Enable multi-threading for better performance:Custom HTML template
Create custom HTML shell:Server configuration
Local testing
Use a local web server to test:Double-clicking index.html won’t work due to CORS restrictions. Always use a web server.
MIME types
Ensure your server sends correct MIME types:Compression
Enable gzip or brotli compression:JavaScript interface
Communicate between GDScript and JavaScript:Call JavaScript from GDScript
Call GDScript from JavaScript
Web-specific features
Fullscreen
Download files
Clipboard
Loading screen
Customize loading progress:Performance optimization
Reduce export size
- Remove unused assets
- Compress textures
- Use audio compression (OGG Vorbis)
- Enable script minification
Enable compression
Configure server to serve gzip or brotli compressed files.
Optimize for mobile
- Lower resolution
- Reduce particle count
- Simplify shaders
- Test on mobile browsers
Lazy loading
Split assets into PCK files and load on demand.
Asset streaming
Hosting platforms
itch.io
- Export project to web
- Create a ZIP of all files
- Upload to itch.io
- Set “This file will be played in the browser”
- Set viewport dimensions
GitHub Pages
Netlify/Vercel
Browser limitations
Audio autoplay
Debugging web exports
Browser console
Remote debugging
Common issues
White screen / doesn't load
White screen / doesn't load
- Check browser console for errors
- Ensure MIME types are correct
- Verify files are served over HTTP/HTTPS
- Check for CORS issues
WASM streaming failed
WASM streaming failed
Configure server to send correct MIME type for .wasm files:
application/wasmAudio doesn't play
Audio doesn't play
Most browsers require user interaction before audio playback.
Add a “Click to start” button.
Web-specific code
Analytics integration
Next steps
Android
Export for Android devices
iOS
Export for iOS devices
Desktop
Export for desktop platforms