10 KB JS sample file
A JS file of exactly 10,240 bytes. It is a valid JavaScript source file file, generated for this site and checked with an independent parser.
Download
- Type
- text/javascript
- SHA-256
6437dd89462dcf9c2d0886503da657bdbc54bc362fcd4bc505b5a1e1347cc4e2- Direct URL
https://sampletestfiles.com/downloads/js/sample-js-10kb.js
What is in this file
A "records" array of 81 object literals and two small helper functions. Line comments at the end bring the script to the exact size.
| Array entries | 81 |
|---|---|
| Syntax | ECMAScript 2015+, strict mode |
| Side effects on load | None |
| Encoding | UTF-8 (ASCII characters only) |
How the file begins
The opening lines of sample-js-10kb.js, exactly as they appear in the file.
// SampleTestFiles sample JavaScript file (10 KB)
// Plain ECMAScript with no dependencies. It defines data and two helper functions and runs nothing on load.
'use strict';
const records = [
{ id: 1, name: 'Ethan Zeller', email: 'ethan.zeller1@example.com', plan: 'team', balance: 2769.84, active: true },
{ id: 2, name: 'Elena Underhill', email: 'elena.underhill2@example.net', plan: 'free', balance: 4647.61, active: true },
{ id: 3, name: 'Ethan Farrow', email: 'ethan.farrow3@example.org', plan: 'business', balance: 536.73, active: false },
{ id: 4, name: 'Victor Brennan', email: 'victor.brennan4@example.com', plan: 'business', balance: 2410.43, active: true },
{ id: 5, name: 'Felix Ibarra', email: 'felix.ibarra5@example.net', plan: 'starter', balance: 2832.21, active: false },Preview
Shows the file contents.
Where 10 KB matters
A 10,240-byte file that still arrives in the first round trip of a new connection. These are the default limits a file of this size is useful for testing:
| System | Limit | Note |
|---|---|---|
| TCP initial congestion window | About 14.6 KB (10 segments) | A 10 KB response fits in the first flight of packets; the 25 KB sample does not. |
| nginx and Apache request headers | 8 KB per header line by default | Data this large must go in the request body. |
| webpack asset modules | 8 KB by default | Assets over the threshold are emitted as files instead of data URIs. |
Use this file for
- Checking thumbnail and icon handling
- Testing static asset delivery and caching
- Testing bundlers and minifiers with large inputs
Testing notes for JS
- The old types application/javascript and application/x-javascript are obsolete; text/javascript is the registered type.
- Never execute an uploaded script. Treat .js uploads as text to be stored or analysed.
Technical details
| File name | sample-js-10kb.js |
|---|---|
| Format | JS (JavaScript source file) |
| Extension | .js |
| MIME type | text/javascript |
| Size | 10,240 bytes (10 KB) |
| Kind | Text |
| SHA-256 | 6437dd89462dcf9c2d0886503da657bdbc54bc362fcd4bc505b5a1e1347cc4e2 |
| Created | 2026-10-10 |
| Validation | Exact size, signature bytes and structure checked when the file was generated |
| Preview | Available on this page |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Code |
Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-js-10kb.js 'https://sampletestfiles.com/downloads/js/sample-js-10kb.js'
sha256sum sample-js-10kb.js # Linux
shasum -a 256 sample-js-10kb.js # macOSOn Windows, run Get-FileHash sample-js-10kb.js -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
Related files
Questions about this file
- Is this file exactly 10 KB?
- Yes. It is 10,240 bytes, which is 10 KB in the binary units that operating systems and server limits use (1 KB = 1,024 bytes).
- What is inside the 10 KB JS file?
- A "records" array of 81 object literals and two small helper functions. Line comments at the end bring the script to the exact size.
- Does the sample script do anything when loaded?
- No. It defines an array and two functions and has no side effects.