STUN/TURN Server Test
Test STUN/TURN servers for WebRTC. Validate ICE candidates and diagnose connectivity issues.
ℹ️ Ready to test. Click 'Start Test' button.
What is STUN/TURN Server Testing?
STUN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relays around NAT) are protocols that help establish peer-to-peer connections in WebRTC applications. This tool tests whether your STUN/TURN servers are properly configured and can successfully gather ICE candidates for WebRTC connections.
Why Use This Tool?
Testing your STUN/TURN servers is crucial for ensuring reliable WebRTC connections:
- ✓Validate server configuration before deploying to production
- ✓Diagnose connectivity issues in WebRTC applications
- ✓View all ICE candidates (host, srflx, relay) gathered
- ✓Real-time logging of ICE gathering process
- ✓Detailed test summary with success/failure status
- ✓Completely free and runs in your browser
How to Use
- Enter your STUN server URL (format: stun:host:port)
- Enter your TURN server URL (format: turn:host:port)
- Provide TURN credentials (username and password)
- Click 'Start Test' to begin ICE candidate gathering
- Review the logs and summary to verify server functionality
Common Use Cases
- • Testing STUN/TURN server setup before production deployment
- • Debugging WebRTC connection issues in video/audio applications
- • Validating NAT traversal capabilities
- • Verifying TURN server authentication
- • Monitoring ICE candidate gathering performance
- • Testing different STUN/TURN providers (Twilio, Xirsys, coturn, etc.)
ICE Candidate Types
Host Candidates
Local IP addresses on the device. Always gathered first.
Server Reflexive (srflx)
Public IP address discovered via STUN server. Indicates STUN is working.
Relay Candidates
IP address allocated by TURN server. Indicates TURN is working and will be used if direct connection fails.
Frequently Asked Questions
What's the difference between STUN and TURN?
STUN helps discover your public IP address and port for direct peer-to-peer connections. TURN is a relay server used when direct connection fails due to strict NAT/firewall. TURN is more expensive as it relays all traffic.
Why am I not getting relay candidates?
No relay candidates usually means: (1) TURN server URL is incorrect, (2) TURN credentials are wrong, (3) TURN server is not running, or (4) Firewall is blocking TURN traffic. Check your server configuration and credentials.
Do I need both STUN and TURN servers?
For production WebRTC applications, you should configure both. STUN is used for most connections (cheaper, faster), but TURN is essential as a fallback for users behind restrictive firewalls or symmetric NATs (approximately 8-10% of connections).
How long should the test take?
ICE gathering typically completes in 2-10 seconds. If it takes longer than 30 seconds, there might be network issues or server problems. The tool has a 30-second timeout for safety.
What are good public STUN servers to test with?
Google provides free STUN servers: stun:stun.l.google.com:19302, stun:stun1.l.google.com:19302, etc. For TURN servers, you'll need to set up your own (using coturn) or use paid services like Twilio, Xirsys, or Metered.
Related Tools
JSON Formatter
Format, validate, and beautify JSON data with syntax highlighting
JWT Decoder
Decode and inspect JSON Web Tokens
Regex Tester
Test and debug regular expressions with real-time results
HTML Entity Encoder/Decoder
Convert special characters to HTML entities and vice versa instantly
Hash Generator
Generate MD5, SHA-1, SHA-256 hashes from text
Number System Converter & Bitwise Calculator
Convert numbers between different bases and perform bitwise operations instantly