Base64 Converter
Encode text to Base64 or decode a Base64 string back to text.
Category: Converters
When to use?
Use it to decode a JWT token payload, analyze HTTP Basic auth credentials, or transmit binary data as text.
How to use
- Encode: enter text to convert to a Base64 string.
- Decode: enter a Base64 string to convert back to text.
Input Explanation
Enter the original string to encode or Base64-format text to decode.
Calculation Basis
Base64 represents binary data as text using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is about 33% larger than the original.
Usage Examples
- Check a JWT payload - Decode the Base64-encoded payload of a JWT token to inspect it.
- Analyze HTTP Basic auth headers - Decode the Base64 credentials in an Authorization: Basic header.
- Decode a data URI - Decode the Base64 string in a data: URI to see the original content.
Examples
- "Hello" → "SGVsbG8="
- "Hi" → "SGk=" (UTF-8 basis)
Cautions
- Malformed source data can cause parsing errors or broken output.
- A mismatched encoding standard or complex nested data may break or drop the structure.
Guides
What Base64 encoding is
It converts binary data into 64 characters (A-Z, a-z, 0-9, +, /) for safe text transmission. Common in email attachments, data URIs, and API auth tokens.
Size increase note
Base64 makes data about 33% larger than the original. Converting images or files to Base64 increases size, so it is not ideal for large transfers.
FAQ
What is Base64?
An encoding that represents binary data as text using 64 ASCII characters.
How does the size change with Base64?
It grows about 33% larger than the original.
Can it encode non-ASCII text and emoji?
Yes, it encodes to UTF-8 first, then to Base64.
When does a Base64 decode error occur?
When non-Base64 characters are present or padding is incorrect.
Related Tools
- Image to Base64 Converter - Convert an image file into a Data URL Base64 string, no server upload.
- Base64 → Image Preview - Instantly preview a Data URL Base64 string as an image.
- URL Encode / Decode - Encode text into URL-safe form (%XX) or decode an encoded URL back to text.
- Hash Generator - Convert text into SHA-1, SHA-256, and SHA-512 hashes.
- HTML Escape / Unescape - Convert HTML special characters to entities, and restore entity strings back to characters.
- Color Code Converter - Convert HEX, RGB, RGBA, HSL, HSLA color codes to each other and preview the color.