Text and files to Base64
Base64 turns binary data into plain ASCII characters so it can travel through systems built for text: JSON payloads, HTML and CSS, email attachments and HTTP headers. Type text and it's encoded as UTF-8 first, so accents, non-Latin scripts and emoji survive the round trip.
Switch to file mode to encode an image, PDF or any other file, with the option of a ready-to-use data URL (data:image/png;base64,…). URL-safe output replaces + and / with - and _ for tokens and query strings, and line wrapping at 76 characters matches the MIME email standard.
How to encode to Base64
- 1
Choose text or file
Type text or pick any file.
- 2
Set the options
URL-safe, line wrapping or data URL.
- 3
Copy the result
Or download it as a text file.
Key features
UTF-8 correct
Emoji and every language encode properly.
Any file type
Images, PDFs, fonts, audio and more.
Data URLs
Embed small images straight into HTML or CSS.
URL-safe variant
RFC 4648 base64url for tokens and URLs.
Common uses
- Embedding images: Inline small icons in CSS to save a request.
- API payloads: Send binary data inside JSON.
- Basic auth headers: Encode user:password for an Authorization header.
Tips and good to know
- Base64 makes data about 33% larger, so only inline small images.
- Base64 is an encoding, not encryption — anyone can decode it with the Base64 Decoder.
