Base64 encoder and decoder
Encode text to Base64 or decode it back, in the standard or URL-safe alphabet.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/base64 \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"Hello, World!"}}'
import json, urllib.request
body = {'input': {'text': 'Hello, World!'}}
request = urllib.request.Request("https://setget.net/v1/tools/base64", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/base64", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"Hello, World!"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "base64",
"input": {
"text": "Hello, World!"
}
}
{
"input": {
"text": "Hello, World!"
}
}
Endpoint: POST /v1/tools/base64. Over MCP: run_tool with slug: "base64".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | The text to encode, or the Base64 to decode. |
action |
string | no | Encode text to Base64, or decode Base64 to text. One of: encode, decode. Default: "encode". |
variant |
string | no | Alphabet for encoding. "url-safe" uses - and _ in place of + and /. Decoding accepts both. One of: standard, url-safe. Default: "standard". |
padding |
boolean | no | Keep the trailing "=" padding when encoding. Default: true. |
Examples
Input
{
"text": "Hello, World!"
}Result
{
"text": "SGVsbG8sIFdvcmxkIQ==",
"bytes": 13
}Decoding without padding
Input
{
"text": "SGVsbG8sIFdvcmxkIQ",
"action": "decode"
}Result
{
"text": "Hello, World!",
"encoding": "utf-8",
"binary": false,
"bytes": 13
}URL-safe, no padding
Input
{
"text": "subjects?_d=1",
"variant": "url-safe",
"padding": false
}Result
{
"text": "c3ViamVjdHM_X2Q9MQ",
"bytes": 13
}Questions
- Is Base64 encryption?
- No. Anyone can decode it. Base64 only makes data safe to carry as text; it hides nothing.
- What if the decoded data is not text?
- Bytes that are not valid UTF-8 are returned as hex, with "binary" set to true.
- Do I need the "=" signs to decode?
- No. Missing padding, line breaks and spaces are all accepted.
Related tools
- Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32 - Base58 encoder and decoderEncode text or bytes to Base58 with the Bitcoin alphabet, or decode Base58 back.
base58 - Hex encoder and decoderConvert text to hexadecimal bytes and back, with optional upper case and separators.
hex - URL encoder and decoderPercent-encode text for use in a URL, or decode it. Works on one value or a whole URL.
url-encode - JWT decoderDecode the header and payload of a JSON Web Token and show its times, without verifying it.
jwt-decode - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all