Base64 Encoder / Decoder
Encode and decode Base64 strings (text and files).
Paste text or upload a small file. We encode to standard Base64 (RFC 4648) and decode either standard or URL-safe variants. UTF-8 is handled correctly.
How to use it
Choose encode or decode
Encode turns plain text into Base64; Decode turns Base64 back into plain text. Switch the tab at the top.
Paste the input
The encoder accepts any UTF-8 text. The decoder accepts both standard and URL-safe Base64, with or without padding.
Copy the result
The output updates automatically. Use the copy button to drop it into your code, header, or data URL.
What is it?
Base64 is an encoding scheme that represents arbitrary binary data using only the 64 printable ASCII characters A–Z, a–z, 0–9, '+' and '/'. It's not encryption - anyone can decode it instantly. Its purpose is transport: getting binary bytes safely through systems that only handle text (email bodies, JSON fields, data URLs, JWT payloads). The 'URL-safe' variant swaps '+' for '-' and '/' for '_' so the output can ride in a URL without further escaping.
When to use it
Encode when you need to embed binary in a textual channel: inlining a small image in CSS or HTML as a data URL, packing a credential into a JSON payload, putting a payload into a JWT, attaching a file to an SMTP body. Decode when you receive Base64 data - typically from JWT inspectors, HTTP Basic auth headers, or API responses that wrap binary in JSON.
Common mistakes
Base64 inflates size by ~33% - don't use it for anything large that has a binary-aware alternative (multipart uploads, blob storage). Don't treat it as encryption: decoded output is identical for everyone. Watch for non-standard variants: some systems strip padding, some use URL-safe characters, some wrap output at 76 characters per line.
FAQ
- What's the difference between standard and URL-safe Base64?
- URL-safe Base64 replaces `+` with `-` and `/` with `_`, and usually omits padding. We accept both for decoding.
Related tools
More in this category
- JSON Formatter & Validator
- URL Encoder / Decoder
- Hash Generator (SHA-1, SHA-256, SHA-384, SHA-512)
- JWT Decoder
- Regex Tester
- Markdown to HTML Converter
- YAML to JSON Converter
- CSV to JSON Converter
- SQL Formatter
- HTML Entity Encoder / Decoder
- Cron Expression Reader
- XML Formatter
- HTML Minifier
- Mock Data Generator
- Markdown Table Generator