Base64 Encoder
Convert text to Base64 using UTF-8 so accents, emoji and non-Latin scripts encode correctly. You can also drop any file to get its Base64 string or a ready-to-use data: URL for embedding images in CSS or HTML. A URL-safe option produces Base64URL without padding, as used in JWTs and web APIs.
How to use the Base64 Encoder
- Choose Text or File.
- Type your text, or drop a file up to 10 MB.
- Tick URL-safe or line wrapping if you need them.
- For files, choose plain Base64 or a data URL.
- Copy the output or download it as a text file.
Features
- UTF-8 safe text encoding
- File to Base64 or data URL (up to 10 MB)
- Base64URL variant without padding
- Optional 76-character MIME line wrapping
- Image preview and size overhead stats
Benefits
- Embed small images or fonts directly in CSS and HTML
- Prepare binary data for JSON, email or API payloads
- Files are read locally and never uploaded
Frequently asked questions
Why is the Base64 output larger than my file?
Base64 uses 4 characters for every 3 bytes, so the output is about 33% larger than the input (more with line breaks).
What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _ and usually drops the = padding, so the result can be used in URLs and file names without escaping.
Is Base64 encryption?
No. Base64 is an encoding that anyone can reverse instantly. Never use it to protect passwords or secrets.
Related tools
- JSON Formatter — Beautify or minify JSON with 2-space, 4-space or tab indents, sort keys and browse it as a collapsible tree.
- JSON Validator — Check JSON syntax as you type, see the exact line and column of any error and get warnings for duplicate keys.
- XML Formatter — Pretty-print or minify XML with comments, CDATA and DOCTYPE support, plus a well-formedness check with error positions.
- HTML Formatter — Beautify HTML with your choice of indentation and line wrapping, including inline <script> and <style> blocks.
- CSS Formatter — Beautify minified CSS into readable rules with custom indentation, brace style and one selector per line.
- JavaScript Formatter — Beautify JavaScript with configurable indentation, brace style and line wrapping to make minified code readable.