$ exec portfolio-nav

$ exec base64

Base64 Encoder / Decoder

Type any text or paste a Base64 blob — this tool figures out which way to convert and gives you a copy-ready result. UTF-8 safe, works on emoji, and never sends your input anywhere.

karthick@portfolio — base64 — zshReady
From the input field, press Command or Control plus Enter to run.

output will appear here.

$ cat about.md

Base64 is a binary-to-text encoding scheme that represents arbitrary bytes using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /, with = as padding). It is the lingua franca for embedding binary data into text-only mediums: HTTP basic-auth credentials, data URIs, JWT segments, X.509 certificates, email attachments (MIME), and most JSON/YAML payloads that need to ship a binary blob.

The encoder accepts arbitrary UTF-8 — including emoji, CJK characters, and anything with combining marks — and produces standard padded Base64. The decoder uses a fatal UTF-8 decoder so you’ll see an error rather than silent mojibake if the input isn’t valid text. Direction is auto-detected: if your input only contains the Base64 alphabet and is a multiple of four characters, it is decoded; otherwise it is encoded. You can force direction by prefixing the input with “encode” or “decode”.

Base64 is not encryption. It is reversible by anyone, so never use it to hide secrets — it is only an encoding. A useful mental model: Base64 inflates 3 bytes into 4 ASCII characters, so the encoded form is roughly 33% larger than the input. For URL-safe variants (used in JWT and many web APIs), characters + and / are replaced by - and _, and padding may be omitted.

$ ls examples/

Encode plain texthello world

Produces aGVsbG8gd29ybGQ=

Decode a Base64 stringaGVsbG8gd29ybGQ=

Auto-detects and returns hello world.

Encode emoji / unicodeencode 🎉 launch day

UTF-8 safe — works with any printable text.

Force decode modedecode S2FydGhpY2sgUA==

Useful when the input would otherwise look like plain text.

$ man --faq

Q.Is Base64 encryption?

A.No. Base64 is encoding, not encryption. Anyone can reverse it. Never use it to hide passwords or secrets — use real cryptography (AES, age, libsodium, etc.).

Q.Does this handle UTF-8 / emoji / unicode?

A.Yes. The tool uses TextEncoder/TextDecoder under the hood, so any valid UTF-8 string round-trips correctly, including emoji and bidirectional scripts.

Q.What is the difference between Base64 and Base64URL?

A.Base64URL replaces + with - and / with _ and may drop = padding. It is used in JWTs, JWKs, and URL-safe contexts where + and / would need percent-encoding.

Q.Is anything sent to a server?

A.No. This is a client-side tool — your input stays on your device.

Q.How big does Base64 make the data?

A.Roughly 33% larger than the input (every 3 bytes become 4 ASCII characters), plus up to 2 bytes of padding.

$ Privacy: this tool runs entirely in your browser. Your input is never sent to a server, never logged, and never stored. ← back to all tools