Code sample files

JavaScript, CSS and HTML source files for testing editors, bundlers, minifiers and asset delivery.

Formats in this category

FormatWhat it isSizes
JS sample files.js text/javascriptJavaScript source code, as loaded by browsers and run by Node.js.1 KB to 1 MB
CSS sample files.css text/cssStylesheets that control how web pages look.1 KB to 1 MB
HTML sample files.html text/htmlThe markup language of web pages. As an upload it needs careful handling because browsers will execute it.1 KB to 1 MB
SQL sample files.sql application/sqlA text file of SQL statements, used for database dumps, migrations and seed data.1 KB to 10 MB

About these files

Tools that process source code, such as editors, formatters, bundlers and static hosts, need input of realistic size to show their performance. A one-megabyte stylesheet tells you far more about a minifier than a ten-line example.

The samples are syntactically valid and inert: they define data and rules but do nothing when loaded.

Popular downloads by size

Jump straight to a file. Every size is exact to the byte.

Or browse every format at one size: 1 KB, 10 KB, 100 KB, 1 MB, 5 MB, 10 MB.

What to test

Related categories

Code files: questions

Is the sample code safe to run?
The JavaScript defines an array and two functions and runs nothing on load. As with any downloaded code, read it before running it.

Engineering test checklist for code sample files

When designing automated integration suites for code pipelines, QA engineers must validate three distinct layers: binary container framing, metadata extraction accuracy, and resource-bounded parsing under concurrent load.

Verification layerTarget assertion for codeRecommended test fixture or tool
1. Signature & MIME checkConfirm backend inspects leading magic bytes rather than trusting the client Content-Type header for code uploadsMagic-Byte File Inspector & Spoofed-Extension Fixtures
2. Boundary byte sizesTest minimum valid header size, 1 MB default proxy limit, 10 MB application ceiling, and 50 MB+ streaming transfersSize Buckets (1 KB–1 GB) & In-Browser Generator
3. Corrupt payload handlingVerify that truncated streams or malformed headers in code return HTTP 400/422 instead of crashing the workerBroken-File QA Suite & errors-400.json
4. Checksum reproducibilityAssert that round-trip storage in cloud object storage preserves the exact byte length and SHA-256 digestSHA-256 Checksum Directory

Common failure points in code ingestion workflows