Base64 Encoder & Decoder
Encode text and files to Base64, or decode Base64 strings. Support for UTF-8, ASCII, and URL-safe encoding.
Replace + with - and / with _
Adds line breaks for readability
Input Size
Characters: 0
Bytes: 0 B
Output Size
Characters: 0
Bytes: 0 B
How to Use
- Choose tab – Select Encode or Decode
- Select input method – Paste text or upload a file
- Configure options – Choose URL-safe or line breaks if needed
- Process – Click Encode or Decode and see results
Example
Original Text:
Hello, World!
Base64 Encoded:
SGVsbG8sIFdvcmxkIQ==
URL-Safe Base64:
SGVsbG8sIFdvcmxkIQ==
(Same in this case, but URL-safe changes + → - and / → _)
Use Cases
- API authentication – Basic Auth headers encode credentials as Base64
- JSON payloads – Embedding binary or secure data in JSON APIs
- Email attachments – Email systems use Base64 for binary attachments
- Data URLs – Embedding images in HTML/CSS as data URIs
- URL-safe tokens – Passing encoded data in query strings and URLs
Related Tools
- JSON Formatter – Format and validate JSON data
- Regex Tester – Test patterns and extract data
- Token Counter – Count tokens in your text
- Prompt Cost Calculator – Estimate API costs