DevFlow logoDevFlow
ToolsPipelinesExploreDocsPricing
⌘F
DashboardPipeline BuilderAnalytics

Try Pro — Free 7 days

No credit card required

Base64 Encoder/Decoder Online — Free Encode & Decode Base64

How to Base64 Encode/Decode Online

  1. 1

    Paste your text into the input area on the left, or upload any file using the upload button.

  2. 2

    Choose your encoding options — enable URL-safe mode for use in URLs and JWTs, or line wrapping for MIME-compatible output. Select a character encoding if needed.

  3. 3

    Click Encode or press ⌘↵ (Mac) / Ctrl+Enter (Windows) to convert your text to Base64.

  4. 4

    To reverse the process, paste a Base64 string and click Decode. The tool detects if your input looks like Base64 and prompts you automatically.

  5. 5

    For embedding images in HTML or CSS, use the Data URI action to generate a complete data: URL. Copy the output with ⌘⇧C, download it as a file, or use Share to create a shareable URL.

Base64 Encode/Decode Features

  • ✓

    Standard Base64 encoding and decoding per RFC 4648 with full Unicode support via UTF-8.

  • ✓

    URL-safe Base64 variant (RFC 4648 §5): replaces + with - and / with _, strips padding — ideal for URLs, filenames, and JWTs.

  • ✓

    Data URI generator: creates data:[mime];base64,... strings for embedding images, fonts, and files directly in HTML or CSS.

  • ✓

    Base64 to hex and hex to Base64 conversion for cryptographic and debugging workflows.

  • ✓

    MIME line wrapping: inserts 76-character line breaks per RFC 2045 for email-compatible Base64 output.

  • ✓

    Multiple character encoding support: UTF-8 (default), ASCII, and ISO-8859-1.

  • ✓

    Inline image preview: when decoding produces an image data URI, a visual preview is rendered below the output.

  • ✓

    Auto-detection: automatically detects whether input looks like Base64-encoded data and suggests Decode.

  • ✓

    File upload support: encode any binary file to Base64 or decode Base64 back to a downloadable file.

  • ✓

    Input and output byte size statistics with size ratio badge visualising encoding overhead.

  • ✓

    Shareable URLs: gzip-compresses your input into a URL parameter so you can share it with teammates.

  • ✓

    Works entirely in your browser — no data is ever sent to any server. Your content stays private.

  • ✓

    Keyboard shortcuts for power users: ⌘⇧E to encode, ⌘⇧D to decode, ⌘⇧K to clear.

Frequently Asked Questions

What is Base64 encoding?
Base64 encoding converts binary data or text into a text-safe ASCII string using 64 printable characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary content — such as images and fonts — inside text-based formats like HTML, CSS, JSON, and email, where raw binary would otherwise cause encoding problems.
Is this Base64 tool free?
Yes, completely free with no usage limits. All encoding, decoding, and conversion runs directly in your browser — no account required.
Is my data safe?
All encoding and decoding runs entirely in your browser using pure JavaScript. No data is ever transmitted to a server or stored anywhere outside your browser. Your content stays completely private.
What is URL-safe Base64?
URL-safe Base64 (RFC 4648 §5) replaces the + character with - and the / character with _, and optionally strips the = padding characters. This makes the Base64 output safe to include directly in URLs, HTTP query parameters, filenames, and JWT tokens without requiring percent-encoding.
What is a Data URI?
A Data URI embeds file content directly in HTML or CSS as data:[mime];base64,... — for example, data:image/png;base64,iVBOR.... This allows images, fonts, and other files to be inlined without a separate network request. The tradeoff is larger HTML/CSS file sizes.
Why is Base64 output larger than the input?
Base64 encoding increases data size by approximately 33% because it represents every 3 bytes of binary data as 4 ASCII characters, plus optional line-break padding. This overhead is the cost of making binary data safe for text-based transport protocols.
Can I encode images to Base64?
Yes. Upload any image file using the upload button and the tool encodes it to Base64. Use the Data URI action to generate a ready-to-use data:image/...;base64,... string you can paste directly into an HTML <img> src attribute or CSS background-image property.
Does it handle Unicode and emoji?
Yes. Text is encoded using UTF-8 by default, which fully supports emoji, CJK characters, Arabic, Hebrew, and all other Unicode text. For legacy ASCII-only content you can switch the charset selector to ASCII or ISO-8859-1.
Can I use this to inspect JWT tokens?
Yes. JWT segments use URL-safe Base64 encoding without padding. Paste a JWT segment (the part before or after a `.`) and click Decode. You can also enable URL-safe mode when encoding to produce JWT-compatible output.
Does it work offline?
Yes. All logic is bundled with the page as pure JavaScript. Once the page has loaded, the tool works without an internet connection.

Related Developer Tools

  • URL Encoder/DecoderEncode, decode, and parse URLs and query strings instantly.
  • JWT DecoderDecode, inspect, and validate JWT tokens with claim analysis.
  • JSON FormatterPrettify, minify, and validate JSON data instantly.
  • Hash GeneratorGenerate and verify cryptographic hashes with multiple algorithms.