File size generator
Plan a file of any exact size: binary-prefix conversion, 64 KiB blocking, reproducible filler bytes and text or binary modes, for speed tests and file-size testing.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Generation plan
Byte count, blocking plan and sample bytes.
Enter a target size to plan the file
Bytes: 0 · Blocks: 0 · Last block: 0 · Megabytes: 0
What this tool does
- Speed tests: generate a deterministic 10 MB, 100 MB or 1 GB file and upload or download it twice to estimate bandwidth.
- Find upload limits: increase the size step by step until a cloud drive or form starts rejecting it.
- Test how a program handles large files: text mode gives a readable long file, binary mode an incompressible byte stream.
- Reproduce issues: the same seed and size always give identical bytes, so hashing two downloads proves whether transfer corrupted anything.
Example
Input
10
Output
目标体积:10 MB = 10485760 字节 换算依据:1 KB = 1024 B、1 MB = 1 048 576 B、1 GB = 1 073 741 824 B(二进制前缀,与文件管理器一致) 等于:10240 KB / 10 MB / 0.009766 GB 分块方案:每块 65536 字节(64 KiB),共 160 块,最后一块 65536 字节 内容模式:二进制(0x00–0xFF 确定性循环) 随机种子:20261012(同一种子与体积永远得到同一份内容,下载两次可对比哈希) 前 8 个填充字节:cf 91 ff e7 c5 aa 33 50 二进制模式适合测速:内容不可读但体积精确,且不会被压缩算法明显压缩。 提示:体积不大,浏览器一次性生成即可。
1 KB = 1024 B and 1 MB = 1,048,576 B — binary prefixes, matching file managers.
Frequently asked questions
How many bytes is 1 MB here?
Binary prefixes: 1 KB = 1024 B, 1 MB = 1024² = 1,048,576 B and 1 GB = 1024³ = 1,073,741,824 B, matching what Windows Explorer reports. If you need decimal megabytes (1,000,000 B), switch the unit to B and enter the byte count directly.
Is the content random?
It is deterministic: each filler byte comes from hashing the seed with its index, so the same size and seed always produce exactly the same bytes. That lets you hash two downloads to verify integrity instead of getting different data each time.
Why blocking?
Because building a 1 GB Blob in one go causes a memory spike in the browser. The plan blocks at 64 KiB (65536 bytes, a common IO buffer), with blocks = ⌈bytes ÷ 65536⌉ and the final block size reported separately so the page can stream into a Blob.
What is the difference between text and binary mode?
Binary mode cycles deterministic bytes 0x00–0xFF: unreadable but hard to compress, which is ideal for speed tests. Text mode fills readable lines of a fixed width for opening directly or testing text processors.
What is the size limit?
2 GB (2 × 1024³ bytes). Beyond that single-file browser downloads become unreliable, so use a command-line tool such as dd or fsutil. Above 100 MB the result reminds you to write in blocks.
Does it actually download a file?
This module only computes the plan (byte count, blocks, seed, sample bytes); generation and download happen locally in the page via a Blob, with no server involved.
Keywords:任意体积文件测速文件file size generator生成大文件dummy file分块方案填充字节