Base64 encoder and decoder
Text to Base64 and back, plus data URLs for files. URL-safe variant included.
Base64 exists because some systems only carry text: email attachments, JSON payloads, data URLs in CSS, tokens in a URL. It turns any bytes into letters, at the cost of making them a third larger.
Paste text to encode it, paste Base64 to get the text back. The URL-safe switch produces the variant that uses - and _ instead of + and /, which is what JWTs and query strings need.
Files can be encoded too, as a complete data URL ready to paste into HTML or CSS — useful for embedding a small icon without a second request.
How to use it
- Paste your text (or Base64).
- Choose encode or decode, and URL-safe if you need it.
- Copy the result, or pick a file to get a data URL.
Frequently asked questions
Is Base64 encryption?
No, and this matters: it’s an encoding, reversible by anyone in one step. Never use it to hide a password or a token from someone who can see the data.
Why does my decoded text look like nonsense?
Either it isn’t Base64, or it’s Base64 of binary data (an image, a compressed file) rather than text. This page decodes as UTF-8 text.
What is a data URL for?
Embedding a small file directly in HTML, CSS or JSON instead of linking to it. Keep it to small images and icons — the encoding adds about a third to the size.
Does my data leave the page?
No. Encoding and decoding are done by your browser; nothing is sent anywhere.
More free tools
All text →Diff Checker
See exactly what changed between two versions of a text.
Word Counter
Words, characters, sentences, paragraphs, and reading/speaking time, live as you type.
Case Converter
Switch text between 9 cases: UPPERCASE, Title Case, camelCase, snake_case and more.
JSON Formatter
Pretty-print, minify and validate JSON, with the exact parse error if it’s invalid.
Resize Image
Change image dimensions to an exact width, height or percentage you choose.
Crop Image
Drag freely to crop, or type exact pixel values.