Base64 encoder
Type or paste text and see it in Base64 below, as you type. Choose Base64URL for addresses and tokens, or Gzip + Base64 to make long text shorter. Open or drop any file, such as an image, to get its Base64.
Text as UTF-8
Text is encoded as UTF-8, so accented letters, emoji and every other character survive the trip and decode back exactly.
Three flavours
- Base64: the standard alphabet with + and /, padded with =
- Base64URL: - and _ in place of + and /, without padding, safe in addresses, file names and JWTs
- Gzip + Base64: compressed first (the result starts with H4sI), for long text in a URL, a header or a config value
Pick one in the Convert menu above the editor.
Files
Open or drop a file, such as an image, a PDF or a certificate, and its Base64 appears in the editor, in lines of 76 characters (up to 5 MB). Below it, the file it decodes to is shown, so you can check it.
Copy or keep editing
The Base64 follows your typing. Copy or Download take it as it is; Use as text puts it in the editor in place of your text (Ctrl+Z goes back).
Private: nothing is uploaded
Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.
With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.
Questions
How do I convert an image to Base64?
Open the image, or drop it on the editor: its Base64 appears, ready to copy.
What is the difference between Base64 and Base64URL?
Base64URL uses - and _ in place of + and /, and leaves out the = padding, so the result can go into a URL or a file name without being encoded again.
Is my data uploaded anywhere?
Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.