SOPS decrypt

Runs in your browser

Paste 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
Waiting for input

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.

Examples

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.

The format

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.

PartWhat 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
macSHA-512 over all values, encrypted with the data key: shows whether anything was changed
*_unencryptedKeys 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.

In your terminal

The same with sops

age
export SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt
sops -d secrets.enc.yaml
One value
sops -d --extract '["database"]["password"]' secrets.enc.yaml
PGP
sops -d secrets.enc.yaml   # gpg-agent asks for the passphrase
Edit
sops secrets.enc.yaml      # opens $EDITOR, re-encrypts on save
Encrypt
sops -e --age age1… secrets.yaml > secrets.enc.yaml
Common errors

When sops -d fails

Failed to get the data key

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).

MAC mismatch

Someone edited encrypted values by hand, merged two versions or changed lastmodified. sops refuses; this tool shows the values and warns.

The age key is the public one

age1… is the recipient (public). Decrypting needs AGE-SECRET-KEY-1… from keys.txt.

Key groups (Shamir)

With shamir_threshold, several key parts must come together. This tool can’t combine them; sops -d can.

Also on this page

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.

Under the hood

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.
More formats

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.

FAQ

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.

Searches the list of pages on this site. What you type stays in your browser.