Base64 Encoder
Encode text or local files to Base64, Base64URL, MIME Base64, or data URLs directly in the browser.
Base64 settings
Input
Private by design: your data never leaves your device. Base64 is not encryption.
Output
Paste text or choose a file to see the preview.
Paste text or choose a file to see the preview.
Good to know
Good to know
The Base64 encoder encodes text or files into Base64 directly in your browser, with three formats: standard (+ and /), Base64URL (- and _), and MIME (wrapped at 76 characters). The output can also be generated as a data URL with a configurable media type.
Typical searches include Base64 encoder, text to Base64, file to Base64, and create data URL. Line wrapping, padding, text line endings, and an optional byte order mark can each be controlled individually. Important: Base64 typically makes data about a third larger and is meant for transport, not compression or secrecy.
Typical use cases
Embed an image as a data URL directly in CSS or HTML
Choose an image file and the matching media type to generate a data: URL that can be inserted directly into stylesheets or markup.
Make binary data transportable for JSON or text protocols
Convert a file to Base64 so it can be safely embedded as a string in JSON, XML, or other text-based formats.
Tips for better results
Use Base64URL for URLs and filenames
Choose the Base64URL format when the result ends up in a URL or filename — it avoids the characters + and /, which can cause problems there.
Don't mistake Base64 for encryption
Base64 is reversible without a key and provides no confidentiality — use it only for transport or embedding, not to protect sensitive data.
How it works
How it works
Step by step
Features
Features
Three Base64 formats
Standard, Base64URL, or MIME with automatic line wrapping at 76 characters.
Data URL generation
Generate a complete data: URL with the matching media type directly from text or a file.
Local processing
Text and files never leave your device; encoding runs entirely in the browser.
Frequently asked questions
Frequently asked questions
What's the difference between standard and Base64URL?
Standard uses + and /, Base64URL replaces these with - and _ so the result can be safely used in URLs and filenames.
Is Base64 encryption?
No. Base64 is reversible without a key and serves transport, not secrecy.
More tools
More tools
Base64 Decoder
Decode Base64, Base64URL, MIME Base64, or data URLs to bytes directly in the browser.
URL Encoder
Percent-encode text, paths, query values, and form data locally in the browser.
JWT Decoder
Decode JWTs locally, inspect claims, and optionally verify HMAC signatures in the browser.
JSON Formatter
Validate, format, minify, analyze, and inspect JSON as a tree locally.