Base64 encoder
Encode and decode Base64 and Base64url, text or files.
Try
Base64
About this tool
- Runs in
- your browser
- Your input sent to our servers
- Nothing
- Kept on this device
- nothing
More in the privacy policy.
How to use it
- 01Type or paste text, or open or drop a file, to encode it; switch to Decode and paste Base64, Base64url or a data: URL to decode it. Or pick one under Try.
- 02For encoding, choose the alphabet (Standard or URL-safe), padding and line breaks; for a file you can get a data: URL.
- 03Copy or download the result. Decoded text appears as text; anything else appears as a file with its type, a preview for images and a hex view, ready to download.
Related tools
Questions
What's the difference between Base64 and Base64url?
Base64url (RFC 4648 section 5) swaps the two characters that clash with URLs and file names, + and /, for - and _, and usually drops the = padding. The same two bytes are +/8= in Base64 and -_8 in Base64url. JSON Web Tokens use Base64url.
Why is the Base64 longer than the original?
Base64 writes every 3 bytes as 4 characters, so it's about 33% longer, plus up to two = at the end and any line breaks.
Is Base64 encryption?
No. It only changes how bytes are written, and anyone can decode it. Encrypt data first if it needs to stay secret.
Is my file uploaded?
No. Files and text are read and encoded in this tab, and decoded images are previewed from memory. Nothing is sent to our servers or kept after you leave the page.