A lightweight, browser-based internet speed test application built with Node.js and Express
NetworkSpeed is a simple yet effective web-based speed test tool that measures your internet download speed directly from your browser. No installations, no plugins—just open the link and test your connection instantly.
- 🌐 Browser-based - Works on any device with a web browser
- ⚡ No Installation - Run instantly without setup
- 📊 Real-time Results - Get download speed in Mbps instantly
- 💾 Lightweight - Uses a fixed 10MB test file for accurate measurements
- 🔧 Simple Architecture - Easy to understand and modify
- 🚀 Easy Deployment - Deploy on Render, Railway, Vercel, or any Node host
| Component | Technology |
|---|---|
| Backend | Node.js, Express |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Test File | Binary file (10MB.bin) |
| Hosting | Render (Demo) |
networkspeed/
├── index.html # Main UI template
├── style.css # Styling for the speed test UI
├── speedtest.js # Client-side speed test logic
├── server.js # Express server configuration
├── 10MB.bin # Test file for download speed measurement
├── package.json # Node.js dependencies
├── package-lock.json # Dependency lock file
└── README.md # This file
- User clicks "Start Test" → Browser initiates a download request
- Download begins → JavaScript records the start timestamp
- File transfers → Browser downloads
10MB.binfrom the server - Download completes → JavaScript records the end timestamp
- Speed calculation → App calculates:
(File Size in Mb) / (Time in seconds) = Mbps - Results displayed → Download speed is shown to the user
Download Speed (Mbps) = (File Size: 10 MB × 8 bits/byte) / Download Time (seconds)
- Node.js (v14+)
- npm or yarn
-
Clone the repository:
git clone https://github.com/Sachin23991/networkspeed.git cd networkspeed -
Install dependencies:
npm install
-
Start the server:
npm start
Or for development with auto-reload:
npm run dev
-
Open in browser:
http://localhost:3000
Returns the 10MB test file for speed testing
- Response: Binary file (10MB)
- Content-Type:
application/octet-stream
Serves the main index.html page
- Response: HTML page
- Content-Type:
text/html
Create a .env file if needed:
PORT=3000
NODE_ENV=developmentModify the test file size in speedtest.js:
const TEST_FILE_SIZE = 10; // in MB-
Accuracy: Speed test accuracy depends on:
- Your network conditions
- Server location and availability
- Server load during testing
- Browser caching behavior
-
Browser Compatibility: Works on all modern browsers (Chrome, Firefox, Safari, Edge)
-
Mobile Testing: Fully responsive and works on mobile devices
- Push your code to GitHub
- Connect your GitHub repo to Render
- Set build command:
npm install - Set start command:
npm start - Deploy!
railway link
railway upNote: Vercel's serverless functions have execution limits. For larger files, consider Render or Railway.
- No data collection or analytics
- Speed test results are calculated locally in your browser
- No user information is stored or transmitted
- No cookies or tracking
This project is open source and available under the MIT License.
Contributions are welcome! Feel free to:
- Report bugs
- Suggest improvements
- Submit pull requests
- Share feature ideas
- Upload speed testing
- Ping/latency measurement
- Multiple server locations
- Speed test history
- Comparison with ISP speeds
- Network stability analysis
- Dark mode toggle
For questions or feedback, reach out on GitHub: Sachin23991
Made with ❤️ by Sachin