Skip to content

iamahsanmehmood/sample-files

Repository files navigation

📁 Sample Files Collection

License: MIT Files Formats Categories PRs Welcome

The most comprehensive open-source collection of sample files across every major file format. Perfect for testing file viewers, converters, validators, and any file-processing application.

🧩 The Problem

Every developer building file-related tools faces the same challenge: Where do I find valid sample files for testing?

You need a .heic image, a .gltf 3D model, a .proto file, a .dcm DICOM scan — and you end up spending hours hunting across the internet. Most "sample file" sites are ad-infested, have broken downloads, or only cover common formats.

💡 The Solution

This repo provides 156+ valid, curated sample files across 16 categories and 160+ formats — all in one place, git-cloneable, and ready to use.

📂 Categories

Category Formats Count
📄 Documents PDF, DOCX, PPTX, ODP, ODT, RTF, TXT, LOG, MD, RST, ADOC 11
📊 Spreadsheets XLSX, XLS, CSV, ODS, TSV 5
🖼️ Images JPG, PNG, GIF, SVG, HEIC, TIFF, WebP, AVIF, BMP, ICO, PCX, PPM, TGA 13
🎵 Audio MP3, WAV, OGG, FLAC, M4A, AAC, MID, MIDI 8
🎬 Video MP4, WebM, MOV, AVI, MKV, WMV, FLV, OGV 8
💻 Code JS, TS, JSX, TSX, Python, Java, C, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, Scala, Dart, R, Lua, Perl, Zig, Nim, V, ASM, Groovy, Shell, Batch, PowerShell, Elixir, Haskell, Clojure, HTML, CSS, SCSS, Vue, Svelte, JSON, XML, YAML, TOML, INI, SQL, GraphQL, Proto, Terraform, LaTeX, ENV, CMake, Gradle, Dockerfile, Makefile 51
📦 Archives ZIP, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, GZ, BZ2, XZ, APK, JAR, WHL 11
🧊 3D Models STL, OBJ, MTL, GLTF, GLB, DAE, 3MF, PLY, OFF, AMF, WRL, X3D 12
📐 CAD DXF, STEP, STP, IGES, IGS 5
📧 Email & Contacts EML, MSG, MBOX, VCF, ICS 5
🔤 Fonts TTF, OTF, WOFF, WOFF2, EOT 5
🗄️ Databases SQLite, DB, SQLite3 3
📚 eBooks EPUB, CBZ, FB2 3
🗺️ GIS / Maps GeoJSON, KML, KMZ, GPX, SHP, OSM 8
⚙️ Executables EXE, DLL, ELF, SO 4
🔬 Scientific FITS, HDF5, MAT, NC 4

Total: 156+ files across 160+ formats

🔧 Quick Start

# Clone the entire collection
git clone https://github.com/iamahsanmehmood/sample-files.git

# Or use a specific file directly via raw GitHub URL
curl -O https://raw.githubusercontent.com/iamahsanmehmood/sample-files/main/images/sample.heic

Using in your test suite:

// Point your tests to the cloned repo
const testFilesDir = './sample-files/images/';
const formats = ['jpg', 'png', 'gif', 'svg', 'heic', 'webp', 'avif'];

formats.forEach(format => {
  test(`should handle .${format} files`, () => {
    const file = fs.readFileSync(`${testFilesDir}sample.${format}`);
    expect(processFile(file)).toBeDefined();
  });
});

🎯 Use Cases

  • 🧪 Testing — File viewers, converters, validators, upload/download features
  • 🔄 CI/CD — Automated format support testing in your pipeline
  • 📖 Learning — Understanding different file format structures
  • 📦 Prototyping — Quick access to real files when building demos

🤝 Contributing

Found a format we're missing? PRs are welcome! See CONTRIBUTING.md.

Adding a new file is easy:

  1. Fork this repo
  2. Add your sample.ext file to the right category folder
  3. Update the folder's README
  4. Submit a PR

📜 License

All files are either created specifically for this project (CC0 / Public Domain) or sourced from open, redistributable sources. See LICENSE for details.

⭐ Show Your Support

If this collection saved you time, please star this repo — it helps other developers find it!


👥 Contributors

Thanks to these wonderful people for building this collection:

Ahsan Mehmood Nooral I. Qureshi
Contributor Contributions
@iamahsanmehmood 🎉 Project creator, initial 139 files across all categories
@nooraliqureshi 🚀 Added 38 new files (HEIC, STEP, IGES, Zig, Nim, HDF5, FITS, and more)

Built with ❤️ for the developer community.

About

A curated collection of 200+ sample files across every major file format. Perfect for testing file viewers, converters, validators, and other file-processing tools.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors