Base64 エンコーダー/デコーダー
テキストのBase64エンコード・デコード、ロスレス双方向変換
Base64 Encoding — How It Works and When to Use It
Base64 converts binary data to ASCII text, commonly used for inline images (Data URIs), JWT tokens, and email attachments. This tool encodes/decodes text and images client-side — zero data upload.
How Base64 Encoding Works
Base64 splits every 3 bytes (24 bits) into 4 groups of 6 bits, each mapped to 64 printable characters (A-Z, a-z, 0-9, +, /). Encoded output is ~4/3 the original size. Padding (=) fills incomplete groups.
よくある質問
How much does Base64 increase data size?
Encoding adds ~33% overhead. A 100KB image becomes ~133KB in Base64. This is why Base64 is best for small images and short text — avoid encoding large files with it.
How do I decode a JWT token payload?
A JWT has three parts (Header.Payload.Signature), each Base64Url-encoded. Copy the middle section into this tool and decode to see the user claims and metadata inside the token.
What's the difference between Base64 and Base64Url?
Base64Url replaces + with -, / with _, and removes trailing = padding — making it URL-safe. Standard Base64 may contain characters that need URL encoding. This tool uses standard Base64.