# Test File Generator

> Generate a sample PNG file, a dummy PDF for testing, a test video file 10 seconds long, or ZIP, pcap, WAV and X.509 test files. Built in the browser, free.

- URL: https://bytescope.dev/en/test-files/
- Locale: en · Also: [ja](https://bytescope.dev/ja/test-files.md) · [zh-Hant](https://bytescope.dev/zh-Hant/test-files.md)
- Runs: Files are built in this tab. Nothing is uploaded.
- Requires: Any modern browser (Chrome, Edge, Firefox, Safari), desktop and mobile.
- Updated: 2026-09-08

## What it does

When a test needs a real file, such as a valid PNG, a ZIP with a broken CRC, or a certificate that expires in two days, the usual move is to copy one off the internet or hand-assemble the bytes and get a length field wrong. This page builds the file from the options you set, in this tab. The test suite reads every generator's output back with a separate parser written independently of it.

### Sample images, video and audio

A sample PNG file, JPEG, GIF, BMP or WebP is a solid color at the size you ask for, optionally with an EXIF block, and a GIF can animate. A test video file 10 seconds long is an MP4 with H.264 color bars and `moov` at the front or the end, so players and demuxers that care about faststart can be tested both ways. WAV is a sine tone or silence, and MP3 is silent frames at the bitrate you pick.

### Dummy PDF for testing, archives and certificates

A dummy PDF for testing has as many labelled pages as you set, and can carry an embedded file or RC4 or AES-128 encryption. ZIP takes entry names and contents, ZipCrypto, split volumes, or one deliberately corrupted field for error-handling tests. X.509 makes a self-signed certificate that is valid, expires soon, has expired, or is not yet valid, measured from the current time, with its private key as a second file.

### Also pcap, SQLite and firmware

pcap and pcapng hold a TCP handshake, a DNS query or an HTTP GET. SQLite gets the tables, columns and row counts you describe in JSON. ELF, Intel HEX and UF2 are minimal valid images for firmware tooling. Option names are the same keys the `generate_fixture` tool of ByteScope MCP takes, so a file made here can be asked for again by an agent.

## Limits

Does not produce real photos, speech or music: images are solid colors, audio is a tone or silence, video is color bars. Does not upload anything, and one generation is capped at 8 MB.

## FAQ

### Are the test files uploaded or generated on a server?

Neither. The generator is downloaded the first time you press Generate and runs in this tab. The files never leave the browser. The anonymous event carries the format, success or failure, and a size bucket.

### Why is the sample image a single color?

A solid color keeps the file small and the result exact, so a test can assert on a known pixel. The point is a structurally valid file, not a photo.

### Can I get a test video file 10 seconds long?

Yes. Pick `mp4`, set `durationSeconds` to 10, and generate. The default is H.264 at 320×240 and 30 fps. One generation is capped at 8 MB, so a very long or large video is refused with a message that says why.

### How do I make a certificate that has already expired?

Pick `x509`, set `validity` to `expired`, and set `days` to how long ago it expired. The window is measured from the current time unless you type an instant into `now`. The private key comes as a second file.

### Can an agent generate these files directly?

Yes. ByteScope MCP has a `generate_fixture` tool backed by the same generators, and it takes the option names you see here. It returns the file as base64.

## Related tools

- [ByteScope MCP](https://bytescope.dev/en/mcp.md) — The same generators as an MCP tool, plus hashing, file type and certificate tools for agents.
- [File Type Identifier](https://bytescope.dev/en/file-type.md) — Check what a generated file really is from its magic bytes.
- [Certificate Decoder](https://bytescope.dev/en/certificate-decoder.md) — Read back the subject, SANs and validity window of a generated certificate.
