Code sample files
JavaScript, CSS and HTML source files for testing editors, bundlers, minifiers and asset delivery.
Formats in this category
| Format | What it is | Sizes |
|---|---|---|
| JS sample files.js text/javascript | JavaScript source code, as loaded by browsers and run by Node.js. | 1 KB to 1 MB |
| CSS sample files.css text/css | Stylesheets that control how web pages look. | 1 KB to 1 MB |
| HTML sample files.html text/html | The 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/sql | A 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
- Web development
Placeholder images, media, data and documents for building and demonstrating web interfaces.
- Software development
General-purpose fixtures for building, debugging and demonstrating software that reads or writes files.
- CI/CD pipelines
Fixtures for build, test and deployment pipelines, with checksums for verification.
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.