Tool workspace
Base64 decoder and Base64 encoder online
Decode Base64 to text and encode Unicode text with optional URL-safe output.
Base64 encoder and decoder
bytes →
Examples
Input text
Hello, World!
Base64
SGVsbG8sIFdvcmxkIQ==
Base64 Guides & articles
What Is Base64 Encoding, and Why Does Software Still Use It?
Base64 turns binary bytes into portable text. Understanding why it exists makes its odd-looking output, padding, overhead, and limitations much easier to reason about.
Read articleHow to Base64 Encode and Decode: Strings, Files, and Code Examples
A practical guide to encoding text as Base64, decoding it back, reading the alphabet and padding, and diagnosing the character set problems that make decoded output look wrong.
Read articleBase64 vs Base64URL: Similar Encodings With Different Jobs
Base64URL changes only a few characters, yet those changes matter whenever encoded data appears in URLs, cookies, filenames, or JWTs.
Read articleWhen Not to Use Base64: Performance, Security, and Design Trade-offs
Base64 is useful at text-only boundaries, but using it everywhere creates larger payloads, extra memory work, misleading security, and harder APIs.
Read articleBase64 Decode Bash Guide: Encode and Decode on the Command Line
How to encode and decode Base64 from a terminal across GNU coreutils, BSD, and PowerShell, including the newline and portability traps that silently corrupt output.
Read articleBase64 Encode Image and File Data: Data URIs, PDFs, and Binary
How to encode images, PDFs, and binary files as Base64, embed them as data URIs, recover a file from an encoded blob, and decide when the size overhead is worth paying.
Read articleRelated tools
Base64 decoder and Base64 encoder online is often used together with JWT decoder: decode a JWT token online, JSON formatter, validator and beautifier online, URL decoder and URL encoder online when payloads, tokens, URLs, logs, or markup move through the same workflow.
JWT decoder: decode a JWT token online
Decode JWT header, payload and useful token metadata in the browser.
Open JWT decoder: decode a JWT token online JSONJSON formatter, validator and beautifier online
Format, minify, validate, sort keys, copy and download JSON payloads.
Open JSON formatter, validator and beautifier online URLURL decoder and URL encoder online
Decode URLs, encode values, and inspect URL parts and query params.
Open URL decoder and URL encoder onlineBase64 encoder and decoder
Decode Base64 to text and encode Unicode text with optional URL-safe output. DevToolGrid Online offers a free Base64 decoder and Base64 encoder online.
What is Base64?
Base64 is an encoding scheme that represents binary data as ASCII text using 64 characters (A–Z, a–z, 0–9, + and /). It is widely used to embed images in CSS or HTML, carry binary data inside JSON or email, and store small files as text. Base64 is encoding, not encryption — it does not protect or hide data.
How to encode and decode Base64
- 1 Paste text into the input panel, or pick a file to encode.
- 2 Click Encode to convert to Base64, or Decode to read Base64 back.
- 3 Enable URL-safe if the value will be used in a URL or filename.
- 4 Copy the result, preview images, or download the decoded bytes.
Common Base64 mistakes
- Wrong paddingStandard Base64 is padded with = so its length is a multiple of 4. Removing or adding padding breaks decoding.
- Standard vs URL-safeURL-safe Base64 replaces + and / with - and _. Decoding URL-safe data with a standard decoder fails.
- Treating it as encryptionBase64 is fully reversible by anyone. Never use it to protect passwords or secrets.
Base64 encode and decode in code
Base64 encode Python
base64.b64encode(text.encode("utf-8"))
Decode base64 Python
base64.b64decode(data).decode("utf-8")
Base64 encode JavaScript
btoa(str) // Buffer.from(str).toString("base64")
Decode base64 JS
atob(b64) // Buffer.from(b64, "base64").toString("utf8")
Base64 encode bash / Linux
printf '%s' "$v" | base64 -w 0
Base64 decode command line
base64 -d payload.txt > out.bin
Decode base64 PowerShell
[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($b64))
Base64 encode and decode in Java
Base64.getEncoder().encodeToString(bytes)
Decode base64 C#
Convert.FromBase64String(b64)
Base64 vs Base64URL
Standard Base64 uses + and / and = padding, which are unsafe in URLs and filenames. Base64URL replaces + with -, / with _ and usually drops the padding, so the result is safe to place in query strings, JWTs and file names. This tool supports both with a single toggle.
FAQ
Is this tool free?
Yes. The Base64 encoder and decoder is completely free, with no sign-up or limits.
Is my data sent to a server?
No. Encoding and decoding run locally in your browser, so files and text never leave your device.
Can it encode files and images?
Yes. Drop a file to get Base64, build a data URI, and preview images directly in the browser.
What is URL-safe Base64?
A variant that uses - and _ instead of + and / so the value can be used safely in URLs, filenames and tokens.
Do I need a Base64 decoder download?
No. This Base64 decoder tool runs in the browser, so there is no installer and no Base64 decoder website sign-up. A Base64 decoder and encoder in one page handles both directions.
Does it work as a Base64 encoder and decoder together?
Yes. The same panel is a Base64 encoder decoder pair: Base64 encode decode in one place, Base64 encode online for text or files, and a Base64 to text converter for the reverse.
Can it Base64 encode an image or a binary file?
Yes. Drop a file to Base64 encode an image, a PDF or any binary file, then decode Base64 to file form again and download the bytes.