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.
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.
This repo provides 156+ valid, curated sample files across 16 categories and 160+ formats — all in one place, git-cloneable, and ready to use.
| 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
# 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.heicUsing 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();
});
});- 🧪 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
Found a format we're missing? PRs are welcome! See CONTRIBUTING.md.
Adding a new file is easy:
- Fork this repo
- Add your
sample.extfile to the right category folder - Update the folder's README
- Submit a PR
All files are either created specifically for this project (CC0 / Public Domain) or sourced from open, redistributable sources. See LICENSE for details.
If this collection saved you time, please star this repo — it helps other developers find it!
Thanks to these wonderful people for building this collection:
| 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.