Dev
Fake File & MIME Type Dataset Generator
Used by developers, writers, and creators worldwide.
The fake file and MIME type dataset generator produces mock file records with accurate filenames, byte-range sizes, correct MIME types, MD5 checksums, and modification timestamps. Developers use it to seed asset-tracking tables, mock S3 API responses, and drive UI tests for file manager components without touching a real filesystem. Each record mirrors what a cloud storage bucket actually returns, so your fixtures behave like real data from line one. Set the category to images, documents, audio, video, or code to narrow the output, or pick mixed to simulate a general-purpose bucket. Adjust count to match the scale you need — eight records for a unit test, fifty for pagination logic. MIME types always match their file extensions, so server-side validation logic sees structurally correct data every time.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Set the Number of Files count to match how many records your test scenario or database fixture needs.
- Choose a File Category from the dropdown — pick a specific type like 'images' or 'documents', or 'mixed' to simulate a general-purpose bucket.
- Click Generate to produce the file records, each containing a filename, size, MIME type, MD5 checksum, and modification date.
- Copy the output and paste it directly into your test fixture file, database seed script, or API mock handler.
- If you need a different distribution of file types, run the generator multiple times with different categories and combine the results.
Use Cases
- •Mocking S3 ListObjectsV2 responses in Jest by mapping filename, size, and checksum to the Contents schema
- •Seeding a file_metadata Postgres table with varied MIME types across images, audio, and documents
- •Driving Cypress tests for a file manager UI that renders thumbnails, labels, and size badges
- •Testing server-side upload validation that rejects MIME type and file extension mismatches
- •Populating Storybook stories for a media library component with realistic filenames and byte sizes
Tips
- →For database seeding, generate separate batches per category so you can control the ratio of images to documents to video in your test data.
- →When testing MIME validation rejection, generate a batch then manually swap one MIME type to mismatch its extension — the surrounding valid records provide realistic context.
- →Pair video or audio records with large file sizes when testing upload progress or chunked transfer logic, since unrealistically small sizes hide edge cases.
- →If your storage system enforces unique filenames, append the MD5 checksum's first eight characters to each name as a suffix before inserting into your database.
- →Use the code file category specifically when testing syntax-highlighting file managers or code repositories — the extensions map to real language MIME types.
- →Mixed-category output works best for testing sort-by-type and filter features, since it guarantees multiple MIME type groups appear in a single dataset.
FAQ
how to mock an S3 ListObjectsV2 response with fake file metadata
Generate a mixed or category-specific set, then map each record to the S3 Contents schema: filename becomes Key, size maps to Size, the date to LastModified, and the checksum to ETag (wrap it in quotes as S3 does). This gives you a structurally valid mock payload without needing a real bucket or AWS credentials.
are the MD5 checksums valid enough to use in tests
They are correctly formatted 32-character hex strings, so any code that stores, displays, or structurally compares hashes will handle them without errors. They are not computed from real file content, meaning they won't verify against actual files — but for deduplication UI, integrity-check endpoints, or database seed scripts, they work exactly as needed.
do the mime types actually match the file extensions in the output
Yes — every record pairs the file extension with its correct MIME type, so a .png file always carries image/png and a .pdf carries application/pdf. If you want to test rejection logic for mismatched types, generate the set and manually swap one MIME type after copying, then run it through your validation endpoint.