Base64 Encoder & Decoder
Encode and decode Base64 online. Supports text and files, plus URL-safe Base64. Fast, free, and fully client-side.
// base64encodestandard0 b out○ ready
Plain text
Base64
About this Base64 encoder & decoder
Base64 is a way of representing binary data using only printable ASCII characters. It is widely used to embed images in HTML and CSS (data URLs), to send binary data in JSON and XML, and in email attachments. This tool encodes and decodes Base64 for both plain text and files, with support for the URL-safe variant.
Everything runs locally in your browser, so it is safe to paste tokens, credentials, and private payloads — nothing is uploaded.
How to use it
- Choose Encode or Decode.
- Paste your text, or load a file with “Encode file”.
- Toggle URL-safe if your Base64 uses
-and_instead of+and/. - Copy the result from the right pane.
Frequently asked questions
- Is my data sent to a server when I encode or decode?
- No. Encoding and decoding happen entirely in your browser with JavaScript, so your text and files never leave your device.
- What is URL-safe Base64?
- Standard Base64 uses + and / characters and = padding, which have special meanings in URLs. URL-safe Base64 replaces + with -, / with _, and drops the padding so the result can be used directly in URLs and filenames.
- Can I encode binary files?
- Yes. Use the “Encode file” button to load any file — image, PDF, or binary — and get its Base64 representation, which is useful for data URLs and embedding.
- Why does decoding fail sometimes?
- Decoding fails when the input is not valid Base64 — for example if characters are missing, or if URL-safe input is decoded in standard mode. Toggle URL-safe to match how the data was encoded.
// More tools
- JSON FormatterBeautify, minify, and validate JSON with precise error locations.
- UUID GeneratorGenerate v4 and time-ordered v7 UUIDs in bulk, ready to copy.
- Regex TesterTest regex with live highlighting, capture groups, and flags.
- YAML ValidatorValidate YAML and convert to and from JSON.
- Case ConverterConvert between camelCase, snake_case, kebab-case, and more.
- HTML Entity EncoderEscape and unescape HTML entities and special characters.
- URL EncoderPercent-encode and decode URLs and query parameters.
- Number Base ConverterConvert between binary, octal, decimal, and hexadecimal.
- Color ConverterConvert colors between HEX, RGB, and HSL with a live preview.
- Unix Timestamp ConverterConvert Unix epoch timestamps to dates and back.
- JWT DecoderDecode a JWT's header and payload with readable claim times.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256, and SHA-512 hashes from text.
- JSON ↔ CSV ConverterConvert JSON to CSV and CSV back to JSON.
- Cron Expression ExplainerTranslate a cron expression into plain English.