Base64 Encoder/Decoder
Encode text or binary data to Base64 and decode Base64 strings back to text. Supports standard and URL-safe Base64. Useful for data URIs, API tokens, and email attachments.
Encode
Decode
How to use the base64 encoder/decoder
Use the Encode tab to convert text into Base64, or the Decode tab to recover text from Base64. Unicode (emoji, CJK) is fully supported via UTF-8.
Formula & explanation
Base64 encodes 3 bytes (24 bits) as 4 ASCII characters from a 64-symbol alphabet (A–Z, a–z, 0–9, +, /). Output is roughly 33% larger than input. Padding with '=' fills the last group to a multiple of 4.
Examples
"hi" → "aGk=". "Hello, World!" → "SGVsbG8sIFdvcmxkIQ==". A 12-character string becomes a 16-char (with padding) Base64 string.
Frequently asked questions
- Is Base64 encryption?
- No. It's encoding — anyone can decode it instantly. Don't use Base64 to hide secrets.
- What about URL-safe Base64?
- Replace + with - and / with _, and strip = padding. We use standard Base64 here; convert if your protocol requires URL-safe.
Related developer tools tools
- URL Encoder/DecoderPercent-encode and decode URLs and query string values. Handles full URLs or individual components — paste any URL to encode special characters or decode percent-encoded strings.
- HTML Entities EncoderEncode text to HTML entities and decode entities back to text. Converts angle brackets, ampersands, quotes, and other special characters to safe equivalents for use in HTML templates and CMS workflows.
- JWT DecoderDecode JSON Web Tokens and inspect the header, payload, and signature. Paste any JWT to see claims, expiry, issuer, and algorithm — no secret key needed to decode.
- Image to Base64Convert any image file into a Base64 data URI for embedding directly in CSS or HTML. Supports PNG, JPG, GIF, WebP, and SVG. No upload — processed entirely in your browser.
- XML FormatterFormat, indent, and validate XML documents. Detects malformed tags, unclosed elements, and bad attributes with clear line-level error messages. Great for config and API work.
- SQL FormatterPretty-print and format SQL for any major dialect — MySQL, PostgreSQL, SQLite, T-SQL, and more. Normalizes indentation, keywords, and spacing for readable, consistent queries.