Technical Anshu
Tutorials Blog
SHA-256 Bulk Converter

Convert Bulk Numbers to SHA-256 Hashes With a Python Script

You have a list of hundreds or thousands of phone numbers and you need every one of them as a SHA-256 hash. Typing them into a website one by one would take all day. A small Python script reads the whole list from a text file and prints a hash for every line - the method this page walks through end to end.

By Technical AnshuWindows 10 / 118 minute read
Watch the full video above - Bulk Numbers to SHA-256 Hashes by Technical Anshu

SHA-256 takes any input - a number, a word, a whole file - and produces a fixed 64-character fingerprint like the ones below. The same input always gives the same fingerprint, and there is no way to run it backwards. In the video, Technical Anshu uses a ready-made Python script package (linked in the video description) to convert an entire mobile number list in one go. You install Python, install the small library the script needs, paste your numbers into a text file, and run the script from Command Prompt. Here is the complete method, with the honest limits of hashing explained on the linked pages.

Bulk converter - numbers in, SHA-256 hashes out
INPUT (one number per line) 9812345670 9876543210 1234567890 OUTPUT (same order, one hash per line) 9812345670 -> 38d598153049ab375b716cfebe6d423752557621488b77581af8ed2c65c72579 9876543210 -> 7619ee8cea49187f309616e30ecf54be072259b43760f1f550a644945d5572f2 1234567890 -> c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646
Real example values - these are the actual SHA-256 hashes of the three sample numbers shown, computed exactly the way the script computes them.
1

First Understand What a Hash Really Is

SHA-256 is a one-way fingerprint, not a lock with a key. Three facts explain almost everything about it. First, the output is always 64 hexadecimal characters, whether the input is one digit or a whole movie file. Second, the same input always produces the same output, on any computer, forever - that is what makes hashes useful for matching and checking. Third, change even one digit and the fingerprint changes completely. The number 9812345670 hashes to 38d598153049ab375b716cfe... while 9812345671 hashes to ce585c29982b2e740a0599e5... - 59 of the 64 characters are different, even though the numbers differ by a single digit. There is no partial match and no close enough.

2

Install Python on Your System

The script runs on Python, so that goes on first, exactly as shown at the start of the video.

  1. Go to the official Python website, download the Windows installer and run it
  2. On the first setup screen, tick Add Python to PATH before clicking Install - this is what lets you run Python from any Command Prompt window later
  3. When setup finishes, open Command Prompt and type python --version - a version number should answer back

If the version command says Python was not found, the PATH tick was almost certainly missed. Re-run the installer, choose Modify, and add it - no need to start over.

3

Download the Script Package and Install Its Libraries

The video's description carries the download for the script package - a folder containing the Python script and a small requirements file that lists the library the script needs. Download it and extract it to a simple folder, for example on your Desktop.

  1. Open the extracted folder in File Explorer
  2. Click the address bar, type cmd and press Enter - Command Prompt opens already inside that folder
  3. Install the required library with the command from the video

The requirements install command is pip install -r requirements.txt. It reads the requirements file and downloads the listed package from the internet, so stay online for this step. When it ends with a success line, the setup side is finished.

4

Prepare the Numbers File

Inside the package is the file the video edits - a plain text list of the mobile numbers to convert. The format is strict and simple: one number per line, nothing else. No commas, no spaces inside the numbers, no headings. Ten numbers means ten lines; ten thousand numbers means ten thousand lines.

Before you save, read the honest warnings on this site. A stray space at the end of a line becomes part of that line's input and changes its hash, and a number written with a country code is a different input from the same number without one. The bulk mistakes page linked below covers every one of these traps with real examples.

5

Run the Script and Collect the Output

With Command Prompt still open in the folder, run the Python script file from the package - type python, a space, then the name of the script file, and press Enter, exactly as the video demonstrates on screen. The script reads the numbers file line by line and produces the hashed output: one 64-character SHA-256 hash per number, in the same order as your input list. Line 1 of the output belongs to line 1 of the input, and so on down the file.

That ordering is what makes the output usable - you can paste it back beside your original list in a spreadsheet and every hash sits next to its number. Keep the original file and the hashed file together, and name them clearly, because a week later nobody remembers which list a hash file came from.

6

Verify a Few Hashes Before You Trust the File

The video's final step is one every bulk job should copy: take one or two numbers from the middle of the list and check their hashes with an independent tool. If your check value matches the script's output character for character, the whole run is trustworthy.

One honest caution about the check itself. If you verify by pasting into a website, paste the number and check the hash on your own machine where you can - a hash of a phone number is not private, because the number space is small enough to brute force, a warning the privacy page below explains in full. For files rather than values, Windows has the checker built in: certutil -hashfile setup.iso SHA256 prints any file's SHA-256 without installing anything.

Hashing is not encryption. There is no key and no unlock - a SHA-256 hash can never be converted back into the original number. If you need the original values later, keep the original file safe. And never treat a hashed phone list as anonymous data: read the privacy warning page before you share one.

Watch the Full Video

See the script run on screen - Python install, the library command, the numbers file and the final hashed output, step by step.

Watch Full Video
Frequently Asked Questions

What file format does the numbers list need to be in?

A plain text file with one number or value per line and nothing else - no commas, no headings, no spaces inside the numbers. The script reads the file line by line and produces one hash for each line, in the same order.

Can the SHA-256 hash be converted back into the phone number?

Not by reversing the algorithm - hashing is one-way and there is no key. But a 10-digit phone number can be found by brute force: a computer can hash every possible 10-digit number and compare. That is why a hashed phone list still has to be treated as sensitive data.

The script converted thousands of numbers. How do I know it worked correctly?

Do what the video does at the end - pick a couple of numbers from the middle of the list, hash them with a second, independent method, and compare character by character. If those match, the whole run used the same code path and can be trusted.

This guide is based on the Technical Anshu SHA-256 bulk hashing video - Stuck on a step? Ask in the video comments and you will get a reply.