SHA-256 PDF
Hashes the raw file bytes with SHA-256. The hash is computed in this tab. The file is not uploaded.
A $6 day pass is 24 hours, charged once, and it does not renew. Pricing
No ad script loads from this choice. It stays in this browser.
What hash.txt contains
SHA-256 PDF takes one file and hashes the raw bytes. There is no page field and no other field. The download is one text file named hash.txt. The worker does not parse the PDF. It does not load pdf-lib. It does not read a page tree, a content stream, a media box, or an info dictionary. crypto.subtle.digest runs SHA-256 on the bytes you dropped. The digest is 32 bytes. The worker writes those bytes as lowercase hex. That hex is 64 characters. One trailing newline follows the hex. The newline is the only added byte. A file that is empty is a valid hash, not an error. Zero bytes hash to e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. hash.txt for that empty file is those 64 characters plus the newline. The same bytes always produce the same line. A different byte anywhere in the file produces a different line. Text that says ONE and text that says TWO do not matter as words. Only the bytes matter. A title Keep Title is not read. An author Keep Author is not read. A link is not followed. A locked file is hashed as the bytes on disk. This page does not ask for a password and does not guess one. Bytes that are not a PDF are hashed the same way. The worker does not check for a PDF header. It does not count pages. It does not open a network connection. The same function runs in the browser and in the Node tests because both call crypto.subtle.digest. This is not PDF to text, which reads a text layer and writes document.txt. This is not Remove PDF info, which edits the info dictionary and writes no-info.pdf. This is not Split horizontal PDF, which cuts pages into split-horizontal.pdf. This is not Compress PDF, which re-saves the file. This page leaves the original file on disk unchanged and writes only hash.txt. The line is lowercase. Uppercase hex is not used.
The hash is computed in this tab with the open-source workers. The file is not uploaded. There is no GridFS copy. Closing the tab drops the copy. The browser downloads hash.txt. PDF to text writes document.txt. Remove PDF info writes no-info.pdf. The Word page at /pdf-to-word uploads.
There is no page cap on this hash. The tab has to hold the file. This page does not need a pass. A day pass is $6, charged once, for 24 hours, and it does not renew. A year is $60 for 365 days. Neither charge is required to hash a file here. The 20-page server cap is not this tool. That cap belongs to PDF to Word, OCR, and heavy compress.
An empty file is a valid hash, not an error. Zero bytes still produce hash.txt. The SHA-256 of an empty buffer is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 followed by one newline. Bytes that are not a PDF are hashed the same way. A locked file is not rejected, because the worker does not parse it. This page does not ask for a password and does not guess one. Unlock PDF is the separate page.
Steps
- Drop the file. It stays in this tab.
- Set the one option on the page, if it has one.
- Download the result. Closing the tab drops the copy.
Questions
What is inside hash.txt?
hash.txt is 64 lowercase hex characters and one trailing newline. crypto.subtle.digest produced the SHA-256 of the raw bytes. An empty file is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.
Is the PDF uploaded?
No. The hash is computed in this tab. The file is not uploaded. Closing the tab drops the copy. You get one text file named hash.txt. The Word page at /pdf-to-word uploads.
Does an empty file fail?
No. An empty buffer is a valid hash, not an error. hash.txt is the lowercase SHA-256 of zero bytes plus one newline.
Does this page need the $6 day pass?
No. A $6 day pass lasts 24 hours, is charged once, and does not renew. A $60 year lasts 365 days. Neither charge is required to hash a file here. The 20-page server cap is not this tool.