Encode text to Base64 or decode Base64 to text. Supports URL-safe encoding and file conversion. Instant, free, private.
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used everywhere in web development:
data:image/png;base64,...Standard Base64 uses + and / characters, which can cause issues in URLs. Base64url replaces these with - and _, making the output URL-safe without percent-encoding. Use our URL-safe option when encoding data for URLs, filenames, or JWT tokens.
Base64 encoding increases data size by approximately 33%. A 3-byte input becomes 4 Base64 characters. This is an important consideration when embedding large files as data URIs or storing binary data as text.
This tool runs entirely in your browser. Your data is never sent to any server. Safe for encoding API keys, passwords, tokens, and other sensitive data.
Base64 is an encoding scheme that converts binary data into ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It's used to safely transmit binary data over text-based protocols like email and HTTP. Base64 increases data size by about 33% but ensures safe transport of any data.
In JavaScript, use atob() to decode Base64 to a string and btoa() to encode a string to Base64. For example: atob('SGVsbG8=') returns 'Hello'. For URL-safe Base64 (which uses - and _ instead of + and /), replace those characters first before using atob().
Standard Base64 uses + and / as the 62nd and 63rd characters, and = for padding. URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL special characters. JWT tokens use URL-safe Base64 (without padding) for their header and payload sections.
No — Base64 is encoding, not encryption. Anyone with the Base64 string can immediately decode it back to the original data. Base64 provides no security — it's simply a way to represent binary data as text. For security, use actual encryption like AES-256 after encoding sensitive data.
Base64 works in groups of 3 bytes (24 bits) mapped to 4 Base64 characters. When the input length isn't divisible by 3, padding characters (=) are added to complete the final group. One = means the last group had 2 bytes; two == means it had only 1 byte. Some implementations omit padding.