Private Key Formats

Understanding different cryptocurrency private key formats and how to identify them.

Critical Security Warning: Never share your private keys with anyone. This page is for educational purposes only. Anyone with access to your private key has complete control over your funds.

Common Private Key Formats

Cryptocurrency private keys can be represented in several formats. Understanding these formats helps you identify what type of key you have and how to use it properly with different wallet software.

Raw Hex

Description: 64 hexadecimal characters (256 bits)

Length: 64 chars

Example:

0x1234567890abcdef...

WIF (Wallet Import Format)

Description: Base58 encoded, starts with 5, K, or L

Length: 51-52 chars

Example:

5HueCGU8rMjxEX...

WIF Compressed

Description: Compressed public key format, starts with K or L

Length: 52 chars

Example:

KwdMAjGmer...

Mini Private Key

Description: Legacy format, 30 characters starting with S

Length: 30 chars

Example:

S6c56bnXQ...

Understanding Private Keys

A private key is a secret number that allows you to spend or transfer cryptocurrency. It's the most critical piece of information in cryptocurrency ownershipwhoever controls the private key controls the funds.

What is a Private Key?

At its core, a private key is simply a 256-bit number (for Bitcoin, Ethereum, and most cryptocurrencies). This number can be represented in various formats for convenience, but mathematically, it's just a very large integer.

The range of valid private keys is:

  • Minimum: 1
  • Maximum: 2256 - 1 (approximately 1.16 x 1077)

Private Key Formats Explained

1. Raw Hexadecimal (Hex)

Format: 64 hexadecimal characters (0-9, a-f)

Example: e9873d79c6d87dc0fb6a5778633389f4453213303da61f20bd67fc233aa33262

Characteristics
  • Simplest representationjust the raw 256-bit number in hexadecimal
  • Each hex character represents 4 bits (64 chars x 4 bits = 256 bits)
  • Often prefixed with "0x" in Ethereum contexts
  • Case-insensitive (though lowercase is conventional)
  • No checksumtypos can create valid but different keys
Usage
  • Ethereum wallets (MetaMask, MyEtherWallet)
  • Development and testing environments
  • Smart contract interactions
  • Low-level wallet software

2. Wallet Import Format (WIF)

Format: Base58Check encoding, starts with 5, K, or L

Uncompressed: Starts with 5 (51 characters)

Compressed: Starts with K or L (52 characters)

Characteristics
  • Base58 encoding (uses letters and numbers, excluding 0, O, I, l to avoid confusion)
  • Includes 4-byte checksum for error detection
  • Starts with different characters based on compression and network
  • Bitcoin-specific format
Usage
  • Bitcoin Core wallet
  • Paper wallets
  • Hardware wallet backups
  • Wallet import/export functions

3. Mini Private Key Format

Format: 30 characters starting with S

Status: Legacy Format

Characteristics
  • Compact format for physical Bitcoin storage
  • Uses Base58 encoding
  • Always 30 characters
  • Always starts with 'S'
  • Includes one-byte checksum
Usage
  • Legacy Casascius physical Bitcoin coins
  • Paper wallets (older format)
  • QR code generation (smaller QR codes)

Mini private keys are considered legacy and rarely used today.

Public Key vs Private Key

It's important to understand the relationship between private and public keys:

Private Key
  • Secret: Must never be shared
  • Purpose: Signs transactions
  • Analogy: Password
Public Key
  • Public: Safe to share
  • Purpose: Verifies signatures
  • Analogy: Account number
Address
  • Public: Share freely
  • Purpose: Receive funds
  • Analogy: Email address
One-Way Process: You can derive a public key from a private key, and an address from a public key, but you cannot reverse the process.

Security Best Practices

Generating Keys Securely

  1. Use Official Wallet Software: Generate keys with trusted, open-source wallets
  2. Offline Generation: For large amounts, generate keys on an air-gapped computer
  3. Hardware Wallets: Let specialized devices handle key generation
  4. Never Trust Online Generators: Don't use web-based key generators for real funds

Storing Keys Securely

  1. Hardware Wallets: Store keys on dedicated devices (Ledger, Trezor)
  2. Paper Wallets: Print on paper, store in secure physical locations
  3. Metal Backups: Engrave keys on metal for fire/water resistance
  4. Never Store in Plain Text: Don't save unencrypted keys in files or cloud storage

Using Keys Safely

  1. Never Share: Your private key should never be shared with anyone
  2. Use Secure Environments: Only enter keys on trusted, malware-free devices
  3. Be Cautious of Phishing: No legitimate service will ever ask for your private key
  4. Test with Small Amounts: When importing keys, test with small amounts first

Common Scams and Mistakes

Phishing Attacks

Scammers create fake wallet websites or apps that steal private keys. Always verify URLs carefully and download wallets from official sources.

Weak Key Generation

Never try to create "memorable" keys or use predictable patterns. Keys must be generated using cryptographically secure random number generators.

Social Engineering

No one from support, exchanges, or wallet companies will ever ask for your private key. If someone does, it's a scam.

Malware and Keyloggers

Malware can capture private keys when you type or display them. Use hardware wallets for significant amounts.

Critical Warnings
  • Never share private keys
  • Never enter them into websites
  • Never store them digitally unencrypted
  • Never trust "too good to be true" offers
  • Losing your key = losing your funds forever
Quick Identification

Starts with 0x (42 chars): Ethereum hex

64 hex characters: Raw hex key

Starts with 5 (51 chars): WIF uncompressed

Starts with K or L (52 chars): WIF compressed

Starts with S (30 chars): Mini key

Starts with 6P (58 chars): BIP-38 encrypted

Key Generation Tips
  • Use official wallet software
  • Generate offline for large amounts
  • Verify wallet software signatures
  • Consider hardware wallets
  • Never use online generators
Browse Tools

Tool Navigation

629+ tools across 43 categories