Base64 Encoder & Decoder
Encode and decode Base64 with automatic direction detection, plus file and data-URI support.
To encode or decode Base64, paste your text — the direction is detected automatically, so valid Base64 is decoded and anything else is encoded. Files can be encoded too, producing a ready-made data URI. Encoding is UTF-8 safe, so emoji and non-Latin scripts survive the round trip.
Runs in your browser- Direction
- Detected automatically
- Inputs
- Text or any file up to 25 MB
- Variants
- Standard and URL-safe (base64url)
- Overhead
- Roughly 33% larger than the source
- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Is Base64 encryption?
What is base64url?
How does auto-detection decide?
Why is my Base64 bigger than the file?
How to use the base64 encoder & decoder
- 1Choose the input.
- 2Enter or paste your text or base64.
- 3Select your file — the file stays on your device and is never uploaded.
- 4Choose the direction.
- 5Turn "URL-safe (base64url)" on or off as needed.
- 6Press Run, then download the result when it is ready.
Sources & specifications
Embed this tool
Put the working base64 encoder & decoder on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
Data URI GeneratorTurn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.File to Base64 ConverterEncode any file — image, PDF, video, font, archive — as Base64, a data URI, hex or a byte array.Base64 to File ConverterDecode Base64, a data URI or hex back into a downloadable file, with the type detected automatically.PDF to Base64 ConverterEncode a PDF as a Base64 string or a data URI, ready to embed in code.Base64 to PDF ConverterDecode a Base64 string into a real, downloadable PDF file.Multi-Format EncoderEncode text into Base64, hex, binary, URL, HTML entities, ROT13 and more, all at once.
Last updated
More encoders & decoders