# How to decode Base64 on Linux, macOS, Windows or in a browser

> The quickest route on each machine, the errors you will see, and why encoded credentials are not protected.

URL: https://claudegpt.si/news/how-to-decode-base64-terminal-windows-browser  
Published: 2026-10-27T15:09:20.239Z  
Author: ClaudeGPT Si Newsroom  
Section: Guides  
Topics: Base64, Operations, Security basics  
Publisher: ClaudeGPT Si

## Key takeaways

- In a browser, the free AyeTab Base64 tool decodes a pasted string without uploading it.
- On Linux and macOS use base64 -d or --decode; on Windows use PowerShell with Convert.FromBase64String.
- Base64 is encoding, not encryption, so a credential sent as Base64 is readable by anyone who sees it.

How to decode Base64 depends on where you are: in a browser, paste it into a free tool like [AyeTab's Base64 decoder](https://app.ayetab.com/tools/base64); on Linux or macOS, pipe it to `base64 -d`; on Windows, use one line of PowerShell. All three give the same result, because Base64 has no key.

Operators run into Base64 more than they expect: a vendor sends credentials in a Basic auth header, a webhook body arrives encoded, a contractor hands over a "secret" that ends in `==`. Here is the fastest route on each machine, and when to use which.

## How to spot Base64 in the first place

Before you decode, it helps to recognize what you are looking at. Base64 strings use only letters, digits, `+` and `/` (or `-` and `_` in the URL-safe form), their length is usually a multiple of four, and they often end in one or two `=` signs. They show up after `Authorization: Basic` in an HTTP header, inside `data:` links in web pages, in the middle of JWTs (the three dot-separated parts), and in exported config files.

If a string fits that pattern, any of the methods below will read it. If it holds other symbols such as `%` signs, it is probably URL encoding instead, and AyeTab's URL Encode/Decode tool is the one to use.

## In the browser (any computer, no setup)

1. Open [app.ayetab.com/tools/base64](https://app.ayetab.com/tools/base64).
2. Paste the string into the box.
3. Leave the mode on Auto or press Decode.
4. Copy the text from the Text pane.

The page reads the result as UTF-8, so names with accents and non-Latin text come out right, and it shows "Decode failed" if the string is not valid Base64. It runs in the browser tab: what you paste is not uploaded to AyeTab's servers, you do not need an account, and it is free.

That last point is the reason to prefer it for business data. A Base64 string is often a password, an API key or a customer record in disguise, and pasting it into an unknown website can send it to that site's server.

## On Linux

```bash
echo 'aGVsbG8gd29ybGQ=' | base64 -d
```

To decode a file into another file:

```bash
base64 -d encoded.txt > output.bin
```

If the input has stray characters, GNU's `base64` accepts `--ignore-garbage` (`-i`) to skip them.

## On macOS

```bash
echo 'aGVsbG8gd29ybGQ=' | base64 --decode
```

macOS accepts `-d`, `-D` or `--decode`, and has `-i` and `-o` flags for input and output files: `base64 --decode -i encoded.txt -o output.bin`.

## On Windows

PowerShell can call .NET directly:

```powershell
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('aGVsbG8gd29ybGQ='))
```

`FromBase64String` returns bytes, and `UTF8.GetString` turns them into text. If the string's length is not a multiple of four, or it holds characters outside the Base64 alphabet, you get a `FormatException`. The usual cause is missing `=` padding or the URL-safe variant, which uses `-` and `_` in place of `+` and `/`.

## Which one to use

| Situation | Fastest route |
| --- | --- |
| One string, any machine | AyeTab in the browser |
| Large file | `base64 -d` on Linux or macOS |
| Locked-down Windows laptop | PowerShell, or AyeTab |
| Repeated job in a script | The command line or a language library |

## Make it a habit, not a hunt

If your team decodes things often, the [AyeTab Chrome extension](https://ayetab.com) is worth installing. It replaces the new tab page with a set of developer tools, also opens them in a side panel, and suggests the decoder when you paste a Base64 string. It is free, needs no account, and keeps working offline once installed.

## When the command line is the better call

For files, batch jobs or anything you want to repeat, use the terminal or a script; a web page is for reading single values. And if the decoded result looks like random symbols, it was never text: save it as a file and open it with the right program, or use a decoder with file download such as base64.guru.

## One rule for operators

Base64 is encoding, not protection. If someone sends you a credential "encrypted" as Base64, anyone who sees the message can read it. Rotate it and ask for a proper secret-sharing method.

## Frequently asked questions

### How do I decode Base64 on Windows without installing anything?

Use PowerShell: [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('your string')). Or open the AyeTab Base64 page in your browser.

### Why do I get an invalid length or format error?

The string is missing = padding, contains stray characters, or uses the URL-safe alphabet with - and _. Fix those and decode again.

### Is Base64 a safe way to send a password?

No. Anyone can decode it. Use a password manager or a secret-sharing tool instead.

## Sources

- [Base64 Encode and Decode Online](https://app.ayetab.com/tools/base64), AyeTab
- [AyeTab](https://ayetab.com), AyeTab
- [AyeTab: Developer Utilities](https://chromewebstore.google.com/detail/hfcgbpmgokbjeiblnheamfdfbochlaah), Chrome Web Store
- [base64 invocation](https://www.gnu.org/software/coreutils/manual/html_node/base64-invocation.html), GNU Coreutils
- [base64 (macOS)](https://ss64.com/mac/base64.html), SS64
- [Convert.FromBase64String(String) Method](https://learn.microsoft.com/en-us/dotnet/api/system.convert.frombase64string), Microsoft Learn
