Base64 Encoder and Decoder
Encode and decode Base64 text online, with an optional URL-safe alphabet. Runs in your browser, nothing is uploaded to a server.
What this tool does
Encode and decode Base64 text directly in your browser. Supports the standard alphabet and the URL-safe alphabet, with no characters that conflict inside URLs.
To decode a JWT payload, first send it to JSON formatter. If you work with unique IDs, UUID generator is a natural companion.
What you can use it for
- Encode credentials for an Authorization Basic header.
- Decode a JWT payload to inspect its contents.
- Convert text to Base64 to embed it inside a data URI.
- Decode a Base64 parameter that arrives in a URL.
How to use it
- Paste the text or the Base64 string into the input area.
- Pick the mode: encode or decode.
- Enable the URL-safe alphabet if the output will live inside a URL.
- Copy the result with a single click.
Everything runs inside your browser. No file is uploaded to any server. See more tools in this field.
Examples you'll actually run into
These are the real-world Base64 uses you'll see in production. Each one is shown with its input and output so you understand what's actually being moved.
Authorization Basic header
Input
user:passOutput
dXNlcjpwYXNzText with accents
Input
España 🇪🇸Output
RXNwYcOxYSDwn4eq8J+Huw==JSON in data URI
Input
{"id":42}Output
eyJpZCI6NDJ9URL-safe
Input
?foo=bar&x=1Output
P2Zvbz1iYXImeD0xPairs well with
Other tools people reach for in the same flow.
- JSON Formatter and Validator
format and validate JSON
Essential when debugging an API.
- JWT Decoder: Read Token Payload
decode a JWT header and payload
Essential when debugging an API.
- Regex Tester and Debugger
test regular expressions
Strong fit in developer workflows.
- UUID Generator and Validator
work with UUIDs
Strong fit in developer workflows.
- QR Code Generator (PNG, WiFi)
turn text or a URL into a QR code
Strong fit in developer workflows.
- Number Base Converter
convert number bases
Strong fit in developer workflows.
Related tools
DeveloperJSON Formatter and Validator
Format, validate and minify JSON online. Beautify messy JSON or compact it in one click, free and entirely in your browser, no upload.
Regex Tester and Debugger
Test and debug regular expressions online in real time, with capture groups and live match highlighting. Free and in your browser, no upload.
UUID Generator and Validator
Generate, validate and convert UUIDs online: v4, v5, v7, NIL and MAX. Instant and free, in your browser, no upload to any server.
URL Slug Generator (Slugify)
Turn any text into a clean URL slug online, ready for permalinks and SEO. Free, instant and in your browser, no upload to any server.
Frequently asked questions
What is Base64?
Base64 is a way to represent binary data using 64 printable ASCII characters. It's used to send images, keys or binary JSON over text-only channels such as HTTP headers or URLs.
What's the difference with the URL-safe alphabet?
The standard alphabet includes + and / as two of its characters. In a URL, those characters have special meanings and must be escaped. The URL-safe alphabet replaces them with - and _, so you can paste the output into a URL with no extra escaping.
Is it safe to encode passwords in Base64?
No. Base64 is encoding, not encryption. Anyone who intercepts the string can decode it without effort. For sensitive data you need real encryption (TLS for transport, AES for storage).
Is there a size limit?
For regular text, no. The tool runs in browser memory, so several megabytes work fine. Beyond that it may slow down.
Why won't my Base64 string decode?
Decoding fails when the input contains characters outside the alphabet. A valid Base64 string only uses A-Z, a-z, 0-9 and + / (or - _ in URL-safe mode), plus optional = padding at the end. The usual culprits are spaces, tabs or line breaks copied along with the string, a leading prefix like data:...;base64, or missing padding. Strip any whitespace and newlines, remove the prefix, and make sure the length is a multiple of 4 (add = until it is). Then decode again.

