Sample JavaScript Files for Download

JS · .js

Free downloads · No account required · File sizes and checksums listed

Download sample JavaScript files for upload, parsing and syntax-highlighting tests. The 10 KB sample includes 33 fictional orders and functions for calculating totals and filtering records.

Choose a sample below. Exact file sizes are listed beside each download.

Download Sample JS Files

Verified sample files · Actual sizes · SHA-256 available

Target size File Actual size Download
10 KB example-10kb.js 10 KB Download
100 KB example-100kb.js 99 KB Download
500 KB example-500kb.js 492 KB Download
1 MB example-1mb.js 1006 KB Download
5 MB example-5mb.js 4.92 MB Download
10 MB example-10mb.js 9.85 MB Download

Target size is approximate. Use Actual size for limit tests. Open file details for SHA-256 checksums.

File details and SHA-256 checksums

Full SHA-256 for automated tests. MIME text/javascript for all sizes.

  • 10 KB example-10kb.js 10139 bytes (10 KB)
    167829bfbab6ae5724f3ae6ed747f800bbae3aff0a07f168fab922103e8c2441
  • 100 KB example-100kb.js 101135 bytes (99 KB)
    084e945e9dda2bfce97a9139daeebcf1e2dcf34092ca91172b33d5bb37e17f0d
  • 500 KB example-500kb.js 503398 bytes (492 KB)
    a7a346a374ba6d954e74d069f63923ac2a5688f03e78e3cc7349140e538d5f01
  • 1 MB example-1mb.js 1030612 bytes (1006 KB)
    76ed1a2efe72503c54efa2af456ef1558bd8217116bab2377676b057a3658f43
  • 5 MB example-5mb.js 5161447 bytes (4.92 MB)
    0414f39755b73c90459cd863608e585f616d86427f85aff72788aaa0b0c52512
  • 10 MB example-10mb.js 10333579 bytes (9.85 MB)
    68122507ecb8022e4aa1e76ad95c3e085ccc18e8c7beeb3460b05d1944d403a3

How to download

  1. Choose a file in the table and click Download.
  2. Optional: open File details and SHA-256 checksums to confirm the exact bytes for repeatable tests.

Browse more Sample Developer Files or return to Free Example Files.

About these samples

These are synthetic sample files for testing and learning. They are not real user documents and are not intended to contain personal data. A matching SHA-256 confirms you received the published bytes — it is not a malware scan or a guarantee that every application will accept the file.

File information

Format
JavaScript Source
Extension
.js
MIME type
text/javascript
Category
Developer Files
License
Free for testing and development

Common test uses

  • Source upload forms: Confirm .js acceptance.
  • Bundler / linter smoke tests: Stable CDN fixtures.
  • Highlighter QA: Preview JS in admin UIs.

What's in these samples

Checked on example-10kb.js: 33 fictional order objects; helpers such as orderTotal, revenueByCity, and filterByStatus; conditional CommonJS-style exports and direct-run logging.

JavaScript excerpt

Abbreviated preview — not a runnable example. Structure from the published 10 KB file with omissions marked.

'use strict';
/**
 * Get Example Files - sample JavaScript module.
 */
const orders = [
  {"id": 1, "order_code": "ORD-100001", "customer": "Keira Everhart", …},
  // 33 fictional order objects in the 10 KB file
];

function orderTotal(order) { /* … */ }
function revenueByCity(list) { /* … */ }
function filterByStatus(list, status) { /* … */ }

What Is a JavaScript Example File?

A JavaScript (.js) example file is sample source for upload handlers, parsers, and syntax highlighters — separate from this site’s own runtime scripts.

The 10 KB fixture holds fictional order data and helper functions. Confirm module format in the runtime you care about.

Notes about these JS samples

MIME type is text/javascript. Related: PY, JSON, XML.

Frequently Asked Questions

Are JavaScript example files free?

Yes. Published JS samples are free to download.

What is in the 10 KB JS file?

33 fictional order objects plus helpers for totals, revenue-by-city, and status filtering.

Is this an ES module?

The sample includes conditional CommonJS-style exports and direct-run logging. It is not packaged as an ES module.

Looking for More Sample Developer Files?

Return to the Developer Files category to browse published formats.

Also try: PY Example Files · JSON Example Files · XML Example Files · YAML Example Files

Browse Sample Developer Files