SOPS decrypt
Runs in your browserPaste a file encrypted with SOPS. Without a key you see who can open it; with your age or PGP key you get the plain file, MAC checked. Nothing leaves your browser.
More options
Paste the whole file, sops block included
Without a key you see who can open it. With your age key (or PGP key) you get the plain file, and the MAC is checked.
Start from an example
Each example fills in the tool above and decrypts it. All keys and passwords are demo values made for this page.
How SOPS encrypts a file
SOPS keeps the structure and encrypts every value on its own. A random 256-bit data key does the work; it is stored in the sops block, once for every recipient.
| Part | What it is |
|---|---|
ENC[AES256_GCM,data:…,iv:…,tag:…,type:str] | One value: AES-256-GCM with a 32-byte nonce; the path of keys (e.g. database:password:) is the additional data, so values can’t be swapped |
sops: age / pgp / kms … | The data key, encrypted for each recipient: age, PGP, AWS KMS, GCP KMS, Azure Key Vault, HashiCorp Vault |
mac | SHA-512 over all values, encrypted with the data key: shows whether anything was changed |
*_unencrypted | Keys with this suffix (or matching encrypted_regex rules) stay in plain text |
This page opens the data key with age or PGP. Cloud KMS keys never leave the cloud: decrypting them would need a request to AWS, Google or Azure with your credentials, which a page that sends nothing can’t do. For those, use sops -d.
The same with sops
export SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt sops -d secrets.enc.yaml
sops -d --extract '["database"]["password"]' secrets.enc.yaml
sops -d secrets.enc.yaml # gpg-agent asks for the passphrase
sops secrets.enc.yaml # opens $EDITOR, re-encrypts on save
sops -e --age age1… secrets.yaml > secrets.enc.yaml
When sops -d fails
None of your keys is a recipient. The tool lists who can open the file, without a key: compare with your age public key (age-keygen -y keys.txt).
Someone edited encrypted values by hand, merged two versions or changed lastmodified. sops refuses; this tool shows the values and warns.
age1… is the recipient (public). Decrypting needs AGE-SECRET-KEY-1… from keys.txt.
With shamir_threshold, several key parts must come together. This tool can’t combine them; sops -d can.
git-crypt files
git-crypt encrypts whole files in a git repository with AES-256-CTR. They start with \0GITCRYPT\0. Open the encrypted file (e.g. git show HEAD:secret.env > secret.env.enc without unlocking) and the key from git-crypt export-key. The tool also checks that the key fits: the nonce is a hash of the content.
Tested against the original tools
Every format on this page was checked against values made by the real tool, on 3 December 2026:
- The test files of the sops project (YAML, JSON, .env, INI, comments, several keys, no MAC) with its PGP test key; the MAC must match.
- Files with age keys: values encrypted in Python (cryptography) by the rules of sops.go, the data key encrypted by the age program.
- git-crypt: a repository made with git-crypt 0.7.
Other encrypted formats
Every format has its own page with the same tool. Paste anything into one of them: if it belongs elsewhere, the tool says so and takes it there.
Questions about SOPS
How do I decrypt a SOPS file without sops?
Paste it above with your age secret key or PGP private key. Everything runs in the browser, including the MAC check.
Can I see who can decrypt a file?
Yes, without any key: paste the file and the tool lists the age recipients, PGP fingerprints and KMS keys in the sops block.
Why can’t this page use my AWS KMS key?
A KMS key never leaves AWS (or GCP, Azure). Only a request to the KMS with your credentials can unwrap the data key, and this page sends nothing anywhere.
What is the MAC?
A SHA-512 hash over all values, encrypted with the data key and lastmodified. If someone changes a value without sops, the MAC no longer matches.
Is it safe to paste my age key?
Everything runs in your browser: nothing you paste is sent anywhere, not even to this site. The page’s Content-Security-Policy blocks connections to other sites; check the Network tab of your browser’s developer tools. An age key usually opens every secret of a repository, so for production keys the terminal is the better place.