Shamir Secret Sharing
Split a password into n shares with threshold k and recover it from any k shares locally.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulHow to Use: Split a Secret Into Shares
Splitting a password or confidential note into several shares is useful when several people should be able to recover the information or when you want to protect against losing one storage medium. Just enter the text, set the number of shares and the threshold, then click "Split".
- In the "Secret" field, enter the text you want to split. By default, the example moje-haslo-do-sejfu is filled in. It can be a password, a phrase, or part of a note.
- In the "Number of shares (n)" field, choose how many shares the secret should be split into. Whole numbers from 2 to 255 are accepted; the default is 5.
- In the "Threshold (k)" field, set how many shares are needed to recover the secret. The range is 2–255; the default is 3. The threshold cannot be greater than the number of shares.
- Click "Split".
- Read the result. You will see labels like "Share 1 of 5", and the first k shares are inserted directly into the text box, where you can easily copy them.
Each share is a short record: a number, a colon, and a string of hexadecimal characters. Non-English characters and other characters outside the English alphabet are supported too.
For the default settings, meaning the secret moje-haslo-do-sejfu, number of shares 5, and threshold 3, after clicking "Split" you will see five shares:
- Share 1 of 5: 1:dc69b748194e690cc88ca8eb3488c31e64fc89
- Share 2 of 5: 2:6b5fb69edc14f1abc0c8a5e0830f82409b8ada
- Share 3 of 5: 3:da596bb3e832f9d4642b206fd8aa323b951026
- Share 4 of 5: 4:98ff3e308c506646ead16657dfa08644069003
- Share 5 of 5: 5:29f9e31db8766e394e32e3d88405363f080aff
Save each share separately — only together, in the right number, do they form the secret.
Recovering the Secret From Shares
Recovery means pasting the shares into the recovery field and clicking "Recover secret". The order in which you paste them does not matter; the share number is what counts.
- Prepare at least as many shares as the threshold set during splitting.
- Paste them into the recovery field, each on a separate line.
- Click "Recover secret".
- Below the button, a result labeled "Recovered secret" will appear — it is the same text that was split.
Example: if you paste three shares on separate lines:
- 1:2849cd8ce5cb18e18a94f4c0ad24092ef549f5
- 2:0346f92a478efda43eca8df427b3a3a3a0a80a
- 3:46605ec38f2d8436d8315450e5bad9e83f878a
you will get the text moje-haslo-do-sejfu as the "Recovered secret".
Any set of k shares is enough for recovery. They do not have to be the shares with the lowest numbers or shares stored on the same computer.
Share Format: number:hex and Separators
Each share has a fixed, simple format: the share number, a colon, and a string of digits and letters from a to f written in hexadecimal. One byte of the secret corresponds to two characters of that string.
| Element | Rule |
|---|---|
| Share number | integer from 1 to 255, written before the colon |
| Colon | separates the number from the share data |
| Share data | hexadecimal string of even length |
| Separators | newline, comma, or semicolon |
| Minimum number of shares | 2 |
| Additional conditions | each number can appear only once, and all pasted shares must have data of the same length |
Example of correct format: 3:da596bb3e832f9d4642b206fd8aa323b951026. The number is 3, and everything after the colon is that share's data.
The format is plain text, so you can print a share, write it on a card, or paste it into a note. When writing by hand, be careful: changing one character means the recovered text will not be the original secret.
Security and Share Storage
Shamir's method has a practical advantage: a single share does not reveal the secret's contents, and recovering it requires a set number of shares. That does not remove the need for caution when storing them.
- Keep shares in different places — for example, one in a safe, one with a trusted person, and one on a separate medium.
- Do not send several shares through one channel or in one message.
- Write down how many shares you created and what threshold you set — the tool does not remember this.
- Choose a threshold that fits the situation: a higher one means greater security, but also more trouble if a share is lost.
- Do not treat splitting as the only protection for your most important data.
Splitting and recovery happen in your browser. The secret and the shares are not sent anywhere.
Limitations and What the Tool Does Not Account For
The tool does exactly two things: it splits text into shares and recovers text from shares. It keeps no records and does not check context.
- No threshold verification: the shares do not show how many there were or what threshold was set during splitting, so the tool does not know whether you pasted enough of them.
- No integrity verification: the share data contains no checksum or signature, so a share that was copied incorrectly will not be recognized as invalid.
- No n and k metadata: the number of shares created and the threshold are not included in the share record, so you must remember them yourself.
There is no splitting history, account, or cloud here — nothing is saved after you close the tab, so if you do not copy the shares, they are lost.
If you provide fewer shares than the threshold, or mix shares from two different splits, the resulting text will not be the original secret. This is a natural property of the method itself, not a calculation error.
The tool does not judge whether your secret is strong enough, does not track who you gave shares to, and does not replace a password manager or backup. The result is technical and auxiliary — you decide how to split access to important information.
Frequently Asked Questions
What is Shamir's Secret Sharing?
It is a way to split one piece of information into several shares so that recovering it requires a set number of shares, called the threshold. A single share does not reveal the secret's contents, and any k shares let you recover it.
How many shares do I need to recover the secret?
Exactly as many as the threshold set during splitting — 3 by default. You can paste more shares, and the result will be the same. With fewer shares, the recovered text will not be the original secret.
Is my password sent to a server?
No. Splitting and recovery run in your browser, and the secret and shares are not transmitted anywhere. For the same reason, nothing is saved after you close the tab.
What happens if I lose one share?
If the threshold was 3 and you created 5 shares, losing one or two changes nothing — you can still recover the secret from the remaining shares. If fewer than the threshold remain, recovering the original secret is not possible.
In what format should I save shares?
Each share is a number, a colon, and a string of hexadecimal characters, for example 4:98ff3e308c506646ead16657dfa08644069003. Save it exactly as you see it, preferably in a separate place for each share.
Does each split produce different shares, and can I mix shares from different splits?
Yes, each split creates new, random shares, even if you split the same text with the same settings. Shares from different splits do not match; even though the format is correct, you will not recover the secret.
See also — related tools
This tool runs locally in your browser; it is a demonstration implementation of Shamir's Secret Sharing over GF(256), not an audited cryptographic system — before using it to protect real secrets, verify the implementation and your share storage procedures.