Free CSS sample, test and dummy files

Stylesheets that control how web pages look. Download valid CSS test files in 19 exact sizes, from 1 KB to 100 MB, each with a checksum. Or create one of any size up to 1 GB.

Extension
.css
MIME type
text/css
Kind
Text
Category
Code

Create a CSS file of any size

Choose any size from 220 bytes to 1 GB. The file is made in your browser, so nothing is downloaded from our server. Smaller files usually finish quickly; generation time depends on your device and format. Larger ones are streamed straight into your downloads list in browsers that support it (current Chrome, Edge and Firefox on computers and Android); elsewhere, such as Safari and every browser on iPhone and iPad, the largest size is lower and is shown below.

CSS files by size

Every file below is a valid Cascading Style Sheets file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

CSS sample files by size
FileSizeContentsDownload
1 KB CSS samplesample-css-1kb.css 1 KB1,024 bytes Rules: 8 Download CSS
5 KB CSS samplesample-css-5kb.css 5 KB5,120 bytes Rules: 51 Download CSS
10 KB CSS samplesample-css-10kb.css 10 KB10,240 bytes Rules: 104 Download CSS
25 KB CSS samplesample-css-25kb.css 25 KB25,600 bytes Rules: 261 Download CSS
50 KB CSS samplesample-css-50kb.css 50 KB51,200 bytes Rules: 525 Download CSS
100 KB CSS samplesample-css-100kb.css 100 KB102,400 bytes Rules: 1,050 Download CSS
200 KB CSS samplesample-css-200kb.css 200 KB204,800 bytes Rules: 2,091 Download CSS
500 KB CSS samplesample-css-500kb.css 500 KB512,000 bytes Rules: 5,216 Download CSS
1 MB CSS samplesample-css-1mb.css 1 MB1,048,576 bytes Rules: 10,665 Download CSS
2 MB CSS samplesample-css-2mb.css 2 MB2,097,152 bytes Rules: 21,221 Download CSS
3 MB CSS samplesample-css-3mb.css 3 MB3,145,728 bytes Rules: 31,777 Download CSS
5 MB CSS samplesample-css-5mb.css 5 MB5,242,880 bytes Rules: 52,888 Download CSS
10 MB CSS samplesample-css-10mb.css 10 MB10,485,760 bytes Rules: 105,616 Download CSS
15 MB CSS samplesample-css-15mb.css 15 MB15,728,640 bytes Rules: 157,872 Download CSS
20 MB CSS samplesample-css-20mb.css 20 MB20,971,520 bytes Rules: 210,130 Download CSS
25 MB CSS samplesample-css-25mb.css 25 MB26,214,400 bytes Rules: 262,384 Download CSS
30 MB CSS samplesample-css-30mb.css 30 MB31,457,280 bytes Rules: 314,640 Download CSS
50 MB CSS samplesample-css-50mb.css 50 MB52,428,800 bytes Rules: 523,660 Download CSS
100 MB CSS samplesample-css-100mb.css 100 MB104,857,600 bytes Rules: 1,045,747 Download CSS

What is a CSS file?

CSS describes presentation: colours, spacing, layout and typography. A stylesheet is a list of rules, each pairing a selector, which chooses elements, with declarations that set properties.

Browsers ignore declarations they do not understand and carry on, which lets the language grow without breaking old pages.

How to recognise a CSS file

CSS files have no file signature, the magic bytes that most binary formats begin with.

No signature bytes. CSS files are identified by parsing their content.

Extension.css
MIME typetext/css
StandardW3C CSS, published as modules
EncodingUTF-8
Comments/* */
Error handlingInvalid declarations are skipped

What to test for

These are the behaviours that most often go wrong when software handles CSS files.

Strengths of CSS

  • Fault-tolerant: unknown rules are skipped rather than breaking the page.
  • Compresses and caches extremely well.

Limitations of CSS

  • The cascade makes large stylesheets hard to reason about.
  • A stylesheet in the document head blocks rendering until it loads.

Typical uses of CSS test files

  • Testing minifiers and bundlers
  • Checking asset pipelines and caching
  • Testing code editors and syntax highlighters

Software that opens CSS

  • All web browsers
  • PostCSS, Sass and Lightning CSS
  • Stylelint and editors

Specifications

Related

CSS sample files: questions

What do the sample stylesheets contain?
Custom properties, a body rule and a long list of class rules, with no @import rules or external URLs.
What is the MIME type of a CSS file?
The MIME type is text/css. The file extension is .css.
Is a sample CSS file the same as a dummy or example CSS file?
Yes. Sample, test, dummy and example CSS files are different names for the same thing: a CSS file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy CSS file.