How to Generate SHA-256 Checksum: Windows, Mac, Linux & Online
Step-by-step guide to generating SHA-256 checksums on every operating system. Commands for Windows, macOS, Linux, and free online tools.
🎯 Key Takeaways
- +SHA-256 is universal: The same file produces the same hash on Windows, Mac, Linux, and online — making it perfect for cross-platform verification
- +Built-in on every OS: CertUtil on Windows, shasum on macOS, sha256sum on Linux — no installation needed
- +Batch generation supported: Generate checksums for entire folders with single commands
- +Online tools available: FolderManifest's free tool generates SHA-256 checksums in your browser
- +Use cases: Download verification, backup validation, data migration, compliance auditing, and detecting tampering
What is SHA-256?
SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function that produces a unique 64-character hexadecimal fingerprint for any input data. No matter the file size — from a 1-byte text file to a 50GB disk image — SHA-256 always produces a 256-bit (64 hex character) hash.
Key Properties
Deterministic
The same input always produces the same hash, on every platform.
Collision-Resistant
Two different files producing the same hash is practically impossible.
One-Way
You cannot reverse a SHA-256 hash back to the original file content.
Avalanche Effect
Changing even one bit produces a completely different hash.
SHA-256 Example
File: hello.txt (contents: "Hello, World!") SHA-256: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f File: hello.txt (contents: "Hello, World?") -- changed comma to question mark SHA-256: 3341b0e9e84d887d228e5ff3dcb7d3c68c4e5c4e8c5a9c5c5d5c5e5f5a5b5c5d
A single character change produces a completely different hash. This is what makes SHA-256 perfect for detecting even the smallest file modifications.
Generate SHA-256 on Windows
Option A: CertUtil (Command Prompt)
CertUtil is built into Windows — no installation needed.
certutil -hashfile "C:\path\to\file.txt" SHA256Output:
SHA256 hash of C:\path\to\file.txt: a1 b2 c3 d4 e5 f6 78 90 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0 CertUtil: -hashfile command completed successfully.
Option B: PowerShell Get-FileHash
PowerShell gives cleaner output and supports pipeline operations:
Get-FileHash "C:\path\to\file.txt" -Algorithm SHA256Output:
Algorithm Hash Path --------- ---- ---- SHA256 A1B2C3D4E5F678901234... C:\path\to\file.txt
Get Just the Hash String
(Get-FileHash "C:\path\to\file.txt" -Algorithm SHA256).HashHash All Files in a Folder
Get-ChildItem "C:\MyFolder" -Recurse -File | Get-FileHash -Algorithm SHA256 | Export-Csv -Path "C:\checksums.csv" -NoTypeInformation
Generate SHA-256 on macOS
Single File
Open Terminal and run:
shasum -a 256 /path/to/file.txtOutput:
a1b2c3d4e5f67890123456789abcdef0123456789abcdef0123456789abcdef0 /path/to/file.txt
Hash All Files in a Folder
find /path/to/folder -type f -exec shasum -a 256 {} \; > checksums.txtVerify Against a Checksum File
shasum -a 256 -c checksums.txtIf the file matches, you'll see file.txt: OK. If it doesn't match, you'll see file.txt: FAILED.
Copy Hash to Clipboard
sha256sum /path/to/file.txt | cut -d' ' -f1 | xclip -selection clipboardGenerate SHA-256 on Linux
Single File
sha256sum /path/to/file.txtOutput:
a1b2c3d4e5f67890123456789abcdef0123456789abcdef0123456789abcdef0 /path/to/file.txt
Hash All Files in a Directory
find /path/to/folder -type f -exec sha256sum {} \; > checksums.txtHash All Files Matching a Pattern
sha256sum *.txt > checksums.txtVerify Against a Checksum File
sha256sum -c checksums.txtThis reads the checksum file and verifies each file. Output: file.txt: OK or file.txt: FAILED.
Generate and Verify in One Pipeline
# Generate sha256sum original.txt > original.sha256 # Copy file (simulate transfer) cp original.txt copy.txt # Verify copy echo "$(cat original.sha256)" | sha256sum -c # Output: original.txt: OK
Using b3sum (BLAKE3 — Faster Alternative)
For very large files or high-throughput scenarios, BLAKE3 (b3sum) is significantly faster than SHA-256 while maintaining strong security:
# Install b3sum cargo install b3sum # or: apt install b3sum (on some distros) # Generate hash b3sum /path/to/largefile.iso
Generate SHA-256 Online
If you need a quick checksum without opening a terminal, use FolderManifest's free online comparison tool. It generates SHA-256 checksums in your browser with privacy-first processing.
How to Use FolderManifest Online
- 1. Visit foldermanifest.com/free-tools/compare-files
- 2. Upload your file to either panel
- 3. The SHA-256 checksum is generated automatically
- 4. Upload a second file to compare checksums side by side
- 5. Matching hashes = identical files
Advantages
- + No installation — works in any browser
- + Works on Chromebooks, tablets, phones
- + Privacy-first (in-memory processing)
- + No account or email required
- + Free forever
Limitations
- - 10MB file size limit
- - One comparison at a time
- - Requires internet connection
- - No batch processing
Batch SHA-256 Generation
When you need to generate checksums for entire directories, use these commands for each operating system:
Windows (PowerShell)
# Generate checksums for all files in a folder tree Get-ChildItem "C:\MyData" -Recurse -File | Get-FileHash -Algorithm SHA256 | Select-Object Algorithm, Hash, Path | Export-Csv "C:\MyData-checksums.csv" -NoTypeInformation # Verify later against the saved CSV $saved = Import-Csv "C:\MyData-checksums.csv" $current = Get-ChildItem "C:\MyData" -Recurse -File | Get-FileHash -Algorithm SHA256 Compare-Object $saved $current -Property Hash,Path | Format-Table -AutoSize
macOS / Linux
# Generate checksums
find /path/to/folder -type f -exec sha256sum {} \; > checksums.txt
# Verify later
sha256sum -c checksums.txt 2>&1 | grep -v ": OK"
# Show only files that FAILED or are missing
sha256sum -c checksums.txt --quietFolderManifest Desktop (Visual)
For users who prefer a GUI over the command line, FolderManifest Desktop provides visual batch processing:
- Step 1: Select a folder to scan
- Step 2: FolderManifest generates SHA-256 hashes for every file
- Step 3: Export the manifest as HTML for documentation
- Step 4: Compare against another folder or a previous manifest
Method Comparison
| Method | Platform | Built-in | Batch | GUI | Cost |
|---|---|---|---|---|---|
| CertUtil | Windows | Via script | No | Free | |
| PowerShell | Windows | No | Free | ||
| shasum | macOS | No | Free | ||
| sha256sum | Linux | No | Free | ||
| FolderManifest Online | Any (browser) | N/A | No | Free | |
| FolderManifest Desktop | Windows | N/A | $39 |
Common Use Cases
📥 Download Verification
Software publishers often provide SHA-256 checksums for downloads. Generate the hash of your downloaded file and compare it against the publisher's checksum to verify the download wasn't corrupted or tampered with.
💾 Backup Validation
Generate SHA-256 checksums of your important files before and after backup. Matching hashes confirm your backup is identical to the original. This catches silent corruption from bit rot, transfer errors, and software bugs.
🔄 Data Migration
When moving files between servers, cloud storage, or drives, generate checksums before the move and verify after. This ensures every file transferred correctly — no silent corruption or missing files.
📋 Compliance & Auditing
Regulations like SOX, ISO 27001, and HIPAA require data integrity controls. SHA-256 checksums with documented manifests provide auditable evidence that files haven't been modified.
🚀 Software Deployment
Generate checksums of build artifacts before deployment. After deployment, verify that installed files match the originals. This catches deployment errors and detects tampering.
🔍 Digital Forensics
In forensic investigations, SHA-256 checksums prove that evidence files haven't been modified. Generate a hash at collection time and verify at every stage of the chain of custody.
Frequently Asked Questions
How do I generate a SHA-256 checksum on Windows?
Open Command Prompt and run: certutil -hashfile filename.txt SHA256. Or use PowerShell: Get-FileHash filename.txt -Algorithm SHA256. Both are built into Windows — no installation needed.
How do I generate a SHA-256 checksum on Mac?
Open Terminal and run: shasum -a 256 filename.txt. This is built into macOS — no installation needed.
How do I generate a SHA-256 checksum on Linux?
Open a terminal and run: sha256sum filename.txt. Available on virtually all Linux distributions by default.
Is SHA-256 the same on all operating systems?
Yes. SHA-256 is a standard algorithm defined by NIST. The same file produces the identical SHA-256 hash on Windows, macOS, Linux, and any other platform. This is what makes it perfect for cross-platform verification.
What is the difference between SHA-256 and MD5?
SHA-256 produces a 64-character hex hash (256 bits) with no known collision vulnerabilities. MD5 produces a 32-character hex hash (128 bits) and has known collision attacks where different files can produce the same hash. Always use SHA-256 in 2026.
Can I generate checksums for multiple files at once?
Yes. On Linux: sha256sum *.txt > checksums.txt. On Windows PowerShell: Get-ChildItem -File | Get-FileHash -Algorithm SHA256 | Export-Csv checksums.csv. On Mac: find . -type f -exec shasum -a 256 + > checksums.txt.
How long does SHA-256 generation take?
Very fast. A 10MB file hashes in 1-2 seconds. A 1GB file takes about 3-5 seconds on modern hardware. SHA-256 is optimized for speed on contemporary CPUs with hardware acceleration.
Can two different files have the same SHA-256 hash?
Practically, no. SHA-256 has 2^256 possible values (more than atoms in the observable universe). The probability of a collision is effectively zero. No SHA-256 collision has ever been found.
What is SHA-256 used for?
File integrity verification, download verification, backup validation, data migration checks, compliance auditing (SOX, ISO 27001, HIPAA), software deployment, digital forensics, and detecting unauthorized file modifications.
Can I use SHA-256 to verify files online?
Yes. FolderManifest's free online tool at foldermanifest.com/free-tools/compare-files generates SHA-256 checksums in your browser. Files are processed in memory with zero retention — completely private.
Generate SHA-256 Checksums Now
Try FolderManifest's free online tool — generate and compare SHA-256 checksums instantly. No installation, no email, no data retention.
