← All guides

Base64, URL encoding, and hashing solve different problems

Use small worked examples to choose between encoding text, encoding a URL component, and calculating a digest.

A string that looks unreadable is not necessarily encrypted. Base64, percent encoding, and cryptographic hashes have different purposes. Choosing the right operation prevents broken query parameters and false assumptions about keeping information secret.

Base64 represents bytes as text

With Base64 Encoder, the text hello becomes aGVsbG8=. Decoding that value gives hello again. The operation is reversible and needs no secret key. It is useful when a protocol expects binary data represented as text, but anyone who has the encoded value can decode it. Standard Base64 and URL-safe Base64 use different alphabets; use the form expected by the receiving system.

URL encoding protects a component’s boundaries

With URL Encoder, red & blue becomes red%20%26%20blue. The encoded ampersand belongs to the parameter’s value rather than acting as a separator between query parameters. Encode each value once. If you encode the already encoded percent sign again, it becomes %25 and can change the meaning of the request.

Do not encode an entire structured address when you only intend to encode one parameter. In application code, a URL or query-parameter library is usually safer than manually concatenating separators. Decoding a suspicious address helps you inspect it; it does not establish that visiting it is safe.

A hash is a digest, not encrypted text

With Hash Generator, the SHA-256 digest of abc, without a newline, is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. Add a space and the digest changes. You cannot use a decode button to recover the original message from its digest.

A checksum can help compare bytes, but it does not establish who supplied them. Password storage needs a dedicated password-hashing scheme with a salt and an appropriate cost, rather than a plain SHA digest. When comparing a file download, get the expected checksum through a trusted source and use a file-checksum tool that hashes the actual file bytes.

Choose from the task, not the appearance

Use Base64 when a text-safe byte representation is required, URL encoding for parameter values, and hashing for a digest comparison. None of these operations alone provides a secure private-message system. Remove tokens and personal data before sharing examples for troubleshooting.