
Base64 Decoder and Encoder — Encode or Decode Base64 Online
Cryptic Base64 in logs and payloads slows you down. Decode to readable text or encode any text or file — URL-safe, UTF-8 safe, and instant in your browser.
Paste Base64 or text here — get decoded text or an encoded string back
or drop any file
What you can do with Base64 Encoder/Decoder
Review the main capabilities before you begin.
- Encode text or files to Base64 instantly
- Decode Base64 strings back to readable text
- Generate URL-safe Base64 for query strings
- Encode images and other files to Base64
- Handle UTF-8 and emoji without corruption
- Embed assets inline in code or emails
Settings reference
2 settings
Available controls for Base64 Encoder/Decoder.
Mode
- ModePresets
- Switches between converting plain text into Base64 (Encode) and turning Base64 or a data URL back into readable text or the original file (Decode).Options: EncodeDecode
- URL-safeOn / Off
- Uses the URL-safe Base64 alphabet, swapping + and / for - and _ and dropping = padding, so results can be placed in URLs and filenames; file uploads always use standard Base64.
Related tools for Base64 Encoder/Decoder
Tools for common next steps after Base64 Encoder/Decoder.
Developer Tools
URL Encoder / Decoder
Encode or decode a string or full URL using component and full-URL modes in your browser.
Try it nowDeveloper Tools
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 digests from text or a file in your browser; no account is required.
Try it nowDeveloper Tools
JWT Decoder
Decode a JWT header and payload, inspect its expiry and copy the decoded data locally; no account is required.
Try it nowFrequently Asked Questions
Paste your text or drop any file into the input box, keep the mode on Encode and the Base64 representation appears in the output. For files you get a data URL that can be embedded directly in HTML, CSS or JSON — no upload server in between.
usageURL-safe Base64 swaps "+" for "-" and "/" for "_" and strips the trailing "=" padding so the encoded value can travel inside URLs, filenames and JWT segments without further escaping. Toggle URL-safe whenever the output ends up in a query string, path segment or HTTP header.
technicalNo. Base64 is an encoding, not encryption. Anyone can decode the string in one click, so never use it as a secrecy mechanism. Reach for AES, RSA or libsodium when you need real confidentiality, and use Base64 only to make binary data text-safe.
privacyBase64 packs three bytes into four characters. When the input length is not a multiple of three, the encoder pads the final block with "=" so the output stays a multiple of four. Standard Base64 keeps the padding; URL-safe Base64 drops it because the length is implicit.
technicalYes. The encoder reads the input as UTF-8 before encoding, so Arabic, Chinese, Cyrillic and emoji characters round-trip cleanly. The decoded result is rendered back as UTF-8 text, which is what every modern browser, terminal and API expects.
compatibilityBase64 inflates payloads by roughly 33% — three bytes of input become four bytes of output. That is fine for short tokens, small icons and JSON-embedded thumbnails, but for large assets prefer a direct binary upload or a CDN link to keep transfers fast.
technicalNo. The encoder runs entirely inside your browser using the standard atob / btoa APIs plus a UTF-8 wrapper, so your text or file never reaches a server. That makes the tool safe for tokens, credentials and proprietary binaries you do not want to expose.
privacySwitch the mode to Decode, paste your Base64 string, and the original text appears instantly in the output, ready to copy or download as .txt. If the string uses '-' and '_' instead of '+' and '/', turn on URL-safe so it decodes correctly.
usageYes. Switch to Decode mode and paste the Base64 or data URL text — if it decodes successfully, a "Download as file" button appears next to the plain Download option. Clicking it writes out the exact original bytes with the extension detected from the embedded MIME type, so a base64-encoded photo or PDF comes back as a real, openable file instead of garbled text.
featuresDownload always saves the decoded output as a plain .txt file, which is right when the Base64 represents text. Download as file only appears when the decoded bytes are recognized as binary data — like an image or PDF — and it reconstructs the original file with its proper extension instead of dumping raw bytes into a text file that won't open correctly.
usagePaste the Base64 string or data URL, switch the mode to Decode, then use Download as file to save the original binary — a PDF, PNG, JPG or any other format. Decoding is byte-for-byte, so the file you get back is identical to the one that was encoded. It is the quickest way to turn base64 to pdf or base64 to image without installing anything.
usageDrop the image — PNG, JPG, SVG, anything — into the input and the encoder produces a data URL you can paste straight into an <img> src attribute or a CSS background-image. Because the data URL embeds the image bytes inline, the page makes no extra network request; just remember Base64 adds roughly 33% to the size, so keep inlined images small.
usageNo — Base64 Encoder / Decoder runs entirely in your browser, so what you paste never leaves the machine you are on. That matters if you are checking something that contains a token, a key or customer data. Closing the tab is enough to clear it.
troubleshootingThe error points at the first position that could not be parsed, which is usually just after the real mistake rather than on it — a missing comma, an unclosed quote or bracket, or a smart quote pasted in from a document instead of a straight one. Check the line above the reported position first.
troubleshootingNo to both. Base64 Encoder / Decoder is free, your download carries no watermark, and nothing is asked for at the end — there is no point in the flow where you finish the work and then discover it costs money.
pricingNo — Base64 Encoder / Decoder runs in the browser on desktop and phone. There is nothing to install, no trial to start, and no license to buy before you can see whether it does what you need. Try it on the file you are actually stuck with rather than a sample.
troubleshootingHow Base64 Encoder/Decoder helps you get it done
Real problems it solves every day — for businesses, creators, and everyday tasks. Find the use case that fits you and start.
Embed Images in HTML & CSS as Data URLs
Inline small icons, logos and SVG sprites as Base64 data URLs to save HTTP requests, ship single-file HTML emails and keep prototypes self-contained without external asset hosting
API Authentication & Bearer Tokens
Build HTTP Basic auth headers, decode bearer tokens during API debugging and inspect base64-wrapped credentials shared in Postman, curl examples and OpenAPI docs
Encoding Files for JSON & GraphQL Payloads
Wrap binary uploads (PDFs, images, audio clips) as Base64 strings so they ride safely inside JSON, GraphQL mutations and webhook bodies that only carry text
Decoding Email MIME Attachments
Pull base64-encoded attachments out of raw .eml files, SMTP logs or IMAP responses to recover lost invoices, screenshots and documents from email exports
URL-Safe Tokens for Web Apps
Generate URL-safe base64 strings for password-reset links, email-verification codes, share IDs and short URLs without breaking on "+" or "/" characters in browsers
Inspecting JWT Segments by Hand
Decode the header and payload segments of a JSON Web Token during local debugging when you do not have a full JWT decoder installed in your terminal or editor
Store Certificates & Keystores in CI/CD Secrets
Encode SSL certificates, Android signing keystores or a GCP service-account JSON file to Base64 so they can be pasted into GitHub Actions, GitLab CI or Vercel environment variables that only accept plain text.
Rescue Files Shared as Raw Base64 Text
Paste a base64 blob copied from a Slack message, bug report or email into Decode mode and use Download as file to recover the original image or PDF someone sent you as text instead of an attachment.
Mock API Responses Without a Backend
Generate base64 placeholder images or binary payloads to drop straight into Postman collections, MSW handlers or Swagger examples while the real backend endpoint is still being built.
Debug Webhook Signature Payloads
Inspect the base64-encoded body Stripe, Twilio or another provider sends with a webhook so you can manually verify a signature or replay a payload while building an integration locally.
Recover Files from Base64 API Payloads
Decode base64 to PDF, image or any other binary returned by an API or stored in a database column, then download the original file for inspection — no scripting required.
Watch each transformation land
Every photo crosses the slash untouched and comes out the other side finished.


























