Base64 Encode / Decode
?
About Base64 encoding
- What is Base64 encoding?
- Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It lets binary data — images, files, keys — be safely embedded in text formats like JSON, XML, URLs, or email.
- Is Base64 encryption?
- No. Base64 is not encryption and provides no security — it is fully reversible without a key or password. Anyone can decode it back to the original data instantly, so never use it to protect sensitive information.
- What does "URL-safe" Base64 mean?
- Standard Base64 uses + and / characters and = padding, which have special meaning in URLs and file paths. URL-safe Base64 replaces + with -, / with _, and drops the padding, so the result can be used directly in a URL, filename, or JWT without escaping.
- Why does Base64 output sometimes have line breaks?
- Older systems such as email (MIME) and PEM certificates expect Base64 wrapped at 76 characters per line. Most modern uses — APIs, JSON, URLs — expect one unbroken line, so leave line wrapping off unless a spec calls for it.
- What is a Base64 data URI?
- A data URI embeds a file directly inside HTML or CSS using the format data:<mime-type>;base64,<data>, avoiding a separate network request. It is commonly used for small images, icons, and fonts.
- Does this tool upload my data anywhere?
- No. Encoding and decoding happen entirely in your browser using standard Web APIs. Nothing you type, paste, or upload ever leaves your device.
Configuration options
- URL-safe
- Replaces + with -, / with _, and removes = padding, so the output can be used directly in a URL, filename, or JWT without needing escaping.
- Wrap at 76 chars
- Inserts a line break every 76 characters (MIME/PEM-style). Only needed for legacy systems like email attachments — most modern uses expect a single line.
- Data URI
- Prefixes the output with data:<mime-type>;base64, so it can be pasted directly into CSS or HTML to embed a file inline. Automatically disables line wrapping.
- Load file
- Reads a file from disk (or drag-and-drop onto the input) and encodes its raw bytes — the only way to Base64-encode binary data, since it can't be typed into a text box.
Convert text to and from Base64. UTF-8 safe.
- input chars
- 0
- output chars
- 0
- input bytes
- 0
- output bytes
- 0
- status
- idle