Encode text or files to Base64 and decode Base64 strings instantly, entirely in your browser.
+ with - and
/ with _ for safe use in URLs and JWTs.
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). This tool encodes any plain text or uploaded file to its Base64 representation, and decodes Base64 strings back to human-readable text — with an optional URL-safe mode that swaps + for - and / for _ and strips padding.
The encoding and decoding logic runs entirely in your browser using the native btoa() and atob() APIs — no data is ever uploaded to a server, making it safe for encoding sensitive configuration strings or credentials during local development.
Authorization: Basic <base64>).No. Base64 is an encoding scheme, not encryption. Anyone who has the Base64 string can decode it back to the original data instantly. Do not use Base64 as a security measure — use it only when you need to represent binary data in a text-safe format, and encrypt sensitive data separately with a proper cryptographic algorithm.
Base64 encoding increases the size of the original data by approximately 33%, because every 3 bytes of input become 4 Base64 characters. The size ratio is shown in the output stats panel after encoding. URL-safe mode without padding may produce slightly shorter strings by omitting trailing = characters.
The most common causes are: the string has been URL-decoded before pasting (converting + to spaces), it is missing padding characters (=), or it contains line breaks inserted by some email clients or PEM headers. This tool automatically normalises URL-safe characters and pads the string before decoding, which resolves most issues.