Developer Guide

How to Encode & Decode Base64 and Generate MD5 / SHA-256 Hashes Online (Free)

Base64 shows up everywhere: in API payloads, email attachments, data URIs, JWT tokens and certificates. Hashes such as MD5 and SHA-256 are just as common for checking that a file arrived intact. The ToolTiny Base64 tool puts both in one page with five tabs. This guide follows a real screen recording with a single, simple example, the text test123, so you can repeat every step and compare your results with ours.

Encode, Hash or Encrypt? Three Different Things

Base64 (encoding)MD5 / SHA (hashing)Encryption
Can it be reversed?Yes, by anyoneNo, it is one-wayYes, only with the key
Needs a key?NoNo (HMAC adds one)Yes
Output lengthAbout 4/3 of the inputAlways the same (MD5: 32 hex characters)About the input size
test123 becomesdGVzdDEyMw==cc03e747…acfebee5 (MD5)Depends on the key
Use it forMoving data through text-only systemsChecksums, fingerprints, signaturesKeeping data secret

The most common mistake is treating Base64 as a way to hide something. It is not: our dGVzdDEyMw== turned back into test123 with one paste.

Watch the Whole Process

The recording opens the tool from the menu, encodes test123 with and without padding, tries to decode plain text, decodes the real Base64, visits the JWT and File tabs and finishes with the hashes and the checksum box.

How to Encode, Decode and Hash, Step by Step

  1. Open the Base64 tool

    Open the Developer menu in the top bar and choose Base64 / Hash Encoder, or go straight to tooltiny.com/base64.html.

    Developer menu with Base64 / Hash Encoder highlighted
    Developer → Base64 / Hash Encoder
  2. Five tools in one page

    The editor has five tabs: Base64 Encode, Base64 Decode, JWT Decoder, File → Base64 and MD5 / SHA Hash. It opens on Base64 Encode, with three options above the box: URL-safe (Base64URL), Remove = padding and Wrap lines at 76 (MIME).

    Base64 tool with five tabs: Base64 Encode, Base64 Decode, JWT Decoder, File to Base64 and MD5 / SHA Hash
    Five tabs, one page
  3. Encode text to Base64

    Type or paste your text in Text to encode. The result appears as you type, with no button to press. We typed test123 and got dGVzdDEyMw==. The blue line explains the size: UTF-8 text, 7 bytes → 12 Base64 characters (about 71% larger).

    Text test123 encoded to dGVzdDEyMw== with a size note of 7 bytes to 12 characters
    test123 → dGVzdDEyMw==
  4. Remove the padding if you need to

    Some systems (JWTs, URLs, file names) do not want the = signs at the end. Tick Remove = padding: the result became dGVzdDEyMw, 10 characters instead of 12. URL-safe swaps + and / for - and _, and Wrap lines at 76 splits long results into lines for email (MIME); our short text did not need it.

    Remove padding option ticked, result dGVzdDEyMw with 10 characters
    Without padding: dGVzdDEyMw
  5. Plain text is not Base64

    On the Base64 Decode tab we first pasted the plain word test123. The tool did not invent a result: an orange warning says it decodes to 5 bytes of binary data that is not text, so the input is probably not Base64. Many short words happen to use only Base64 letters, which is why this check matters.

    Base64 Decode tab warning that test123 decodes to 5 bytes of binary data that is not text
    A clear warning instead of garbage
  6. Decode Base64 back to text

    Then we pasted the real Base64, dGVzdDEyMw==. The green line says Decoded 7 bytes of UTF-8 text and the Decoded result shows test123 again. The note above the box says what else it accepts: Base64URL, data:…;base64, strings, spaces, line breaks and quotes.

    Decoded result test123 with the message Decoded 7 bytes of UTF-8 text
    dGVzdDEyMw== → test123
  7. Read a JWT token

    The JWT Decoder tab takes a whole token (the word Bearer is removed automatically) and shows its header and payload. Try a sample fills in an example. The page warns that it only reads the token and does not verify the signature.

    JWT Decoder tab with an empty token box and a note that the signature is not verified
    JWT Decoder: read, don't trust
  8. Turn a file into Base64

    File → Base64 converts images, PDF, fonts or certificates up to 25 MB into Base64. Choose the output: Plain Base64, a Data URI, a CSS url() or an HTML <img> tag, then Copy or save it as .txt. The file stays on your device.

    File to Base64 tab with a drop zone and output choices Plain Base64, Data URI, CSS and HTML
    File → Base64, four output formats
  9. Generate MD5 and SHA hashes

    On MD5 / SHA Hash, type text (or switch to File). Five hashes appear at once. For test123: MD5 cc03e747a6afbbcbf8be7668acfebee5, SHA-1 7288edd0…1687bc, SHA-256 ecd71870…34f75ae, plus SHA-384 and SHA-512. MD5 and SHA-1 carry a WEAK label.

    MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of test123
    Five hashes of test123
  10. Copy a hash

    Each line has its own Copy button. We copied the SHA-512 hash, and a message confirmed SHA-512 hash copied to clipboard. The Output list switches between lowercase hex, uppercase HEX and Base64, and HMAC with secret key adds a key.

    SHA-512 hash copied to clipboard message
    Copy with one click
  11. Compare with an expected checksum

    Under the table, Compare with an expected checksum takes the value printed on a download page and tells you whether it matches. The note below it is worth reading: MD5 and SHA-1 are fine for spotting corrupted downloads but are broken for security, and passwords belong in bcrypt, scrypt or Argon2.

    Compare with an expected checksum box and a warning that MD5 and SHA-1 are broken for security
    Check a download against its checksum

Which Hash Should You Use?

AlgorithmLength (hex)Label in the toolGood for
MD532WEAKSpotting accidental corruption, old systems
SHA-140WEAKLegacy checks only
SHA-25664–Download checksums, API signatures (HMAC-SHA256)
SHA-38496–Certificates, Subresource Integrity
SHA-512128–Long, high-security checksums

None of them is right for storing passwords: they are built to be fast, which makes guessing fast too. Password storage needs a slow, salted algorithm such as bcrypt, scrypt or Argon2.

Good to Know

Follow ToolTiny for short tutorials

One-minute clips on converting, repairing and editing documents, images and text.

Tips

Encode, decode or hash now

Base64, Base64URL, JWT, files and MD5/SHA in one page. Free, private, no sign-up.

Open Base64 Tool

Related ToolTiny Tools

Frequently Asked Questions

How do I encode text to Base64?
Open the Base64 Encode tab and type or paste your text. The Base64 result appears as you type; for example test123 becomes dGVzdDEyMw==. Click Copy Result to copy it.
How do I decode Base64 back to text?
Open Base64 Decode and paste the Base64 string. dGVzdDEyMw== decodes to test123 at once. The tool also accepts Base64URL and data: URIs and ignores spaces, line breaks and quotes.
Why is the Base64 result longer than my text?
Base64 writes every 3 bytes as 4 characters, so the result is about one third larger, plus up to two = signs of padding. Short texts look worse: in our test 7 bytes became 12 characters, about 71% larger.
What does Remove = padding do?
It drops the = signs at the end. Our example dGVzdDEyMw== became dGVzdDEyMw. JWT tokens and many URLs use Base64 without padding; most decoders, including this one, add it back automatically.
Why does decoding plain text give a warning?
Many ordinary words only contain letters that are also valid in Base64, so they can be 'decoded' into meaningless bytes. When the result is not readable text, the tool says so instead of showing garbage. In our test, the word test123 decoded to 5 bytes of binary data.
Is Base64 encryption?
No. Base64 is an encoding that anyone can reverse without a key, so it does not hide anything. Use real encryption to protect data.
Can MD5 or SHA-256 be decoded?
No. Hashes are one-way: they cannot be turned back into the original text. Websites that claim to 'decrypt' MD5 only look the hash up in huge lists of known inputs, which works for common words and fails for anything long or random.
Which hash should I use?
SHA-256 or SHA-512 for checksums and signatures. MD5 and SHA-1 are marked WEAK because collisions have been found; they are only good for spotting accidental corruption. For passwords, use bcrypt, scrypt or Argon2 instead of any of these.
How do I check a downloaded file?
On MD5 / SHA Hash, switch the source to File and choose the file. Then paste the checksum from the download page into Compare with an expected checksum; the tool tells you whether it matches.
Is my data uploaded?
No. The page says text, tokens and files are processed in your browser and are not uploaded or stored.